Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defclass r-vector-sfp (generic-vector)
- ()
- (:default-initargs
- :segment-width 4
- :element-type 'single-float
- :initial-element 0.0)
- (:documentation "Vector with single-float elements"))
- (defmethod initialize-instance :after ((vector r-vector-sfp) &key)
- (setf (slot-value vector 'segments)
- (map-into (make-array (number-of-segments vector))
- (lambda () (make-array (segment-width vector)
- :element-type (element-type vector)
- :initial-element (initial-element vector))))))
- ;;;
- (defmethod (setf vref-seg) ((value single-float) (vector r-vector-sfp) &optional indexes)
- (declare
- (type (element-type vector) value)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement