OK I "fixed" this problem by removing the :cl-array keyword to make-marray, which was obsolete. The :data keyword does work; the argument should be made by make-ffa, e.g. (make-marray 'double-float :data (c-array:make-ffa 'double-float :initial-contents '(1.0d0 2.0d0))) However this isn't really intended for users; I am working on a better user interface.
Liam On Wed, Apr 14, 2010 at 4:26 PM, ivan hohlov <[email protected]> wrote: > 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 > > _______________________________________________ > Gsll-devel mailing list > [email protected] > http://common-lisp.net/cgi-bin/mailman/listinfo/gsll-devel > _______________________________________________ Gsll-devel mailing list [email protected] http://common-lisp.net/cgi-bin/mailman/listinfo/gsll-devel
