[Gsll-devel] New GSD array organization

Liam Healy lhealy at common-lisp.net
Mon Jul 19 12:17:53 UTC 2010


GSLL's underlying system for generalized array, the "Grid
Structured Data" (gsd) has been reorganized.  There are some
user-visible changes:
1. It is simpler to exchange arrays between foreign libraries, and lisp
   code.  For example, a foreign array may be created in Lisp, passed
   to GSLL, then passed to another foreign library, then processed
   once again in Lisp.
2. Grid operations include common array operations for mathematical
   use, such as row, column, diagonal, transpose, slice and others;
   these are built on the more general map-grid which in turn is built
   on map-n-grids, so that more complicated array operations can be
   defined generically.
3. The function #'grid:copy will copy an array, possibly with a change
   of grid type ('array to 'foreign-array or vice versa), or other
   property.
4. Grids types possible at present are CL arrays and foreign arrays.
5. On SBCL, ECL, CCL, Allegro, and Lispworks,  foreign-arrays are
   optionally built using static-vectors
   (http://gitorious.org/iolib/static-vectors).
   For foreign arrays made in Lisp (not by foreign libraries),
   the function cl-array is the same array in Lisp.  Note that
   it is not a copy; the contents of memory are the same.
6. Changes
   1. The grid and foreign-array systems both use the grid package;
      the c-array package doesn't exist any more.
   2. All the array-related definitions of GSLL are now in the system
      foreign-array, including the individual classes such as
      grid:vector-double-float.  To access elements, use grid:gref
      (gsl:maref has been removed).
   3. Internally, foreign-array objects have a slot foreign-metadata.
      Each application is free to add properties to this list; GSLL
      adds 'gsll:mpointer and 'gsll:block-data.

You should do a fresh pull of both GSLL and GSD.

Liam




More information about the gsll-devel mailing list