[Gsll-devel] make-marray, :cl-array keyword

ivan hohlov hohlovivan at gmail.com
Wed Apr 14 20:26:01 UTC 2010


Hi all!

There is a keyword :cl-array for the gsll:make-marray function. Can I
use it to convert native lisp array into marray?
I'm trying to do this:
(defparameter *m* (make-array '(3 3)
                              :element-type 'single-float
                              :initial-contents '((1.0 2.0 3.0)
                                                  (4.0 5.0 6.0)
                                                  (7.0 8.0 9.0))))
(gsll:make-marray 'single-float :dimensions '(3 3) :cl-array *m*)
leads to error "Invalid initialization argument: :cl-array". (sbcl, of course)
Am I right, using :cl-array in such a way? I have searched for
examples with thes key, but found nothing.

Also, if I use :data key instead of :cl-array, it works, but tue
resulting marray couldn't be used in common routines, such as matrix
multiplication, because it isn't simple-array.

To generalize the problem - Is it possible to convert lisp array to
gsll marray without copying data?

Thanks




More information about the gsll-devel mailing list