projects/gsll/gsd.git
2 years agoEliminate complex-to-cl; require FSBV master
Liam Healy [Sun, 28 Nov 2010 03:50:04 +0000] 
Eliminate complex-to-cl; require FSBV

Using fsbv:defcstruct defines conversion between foreign and Lisp for
complex types, so a separate complex-to-cl is no longer necessary.
This means that FSBV is required.  If FSBV's convert.lisp is separated
from FSBV and loaded by itself, then only defconvert may be used and
(the rest of) FSBV will not be necessary.

2 years agoRewrite complex-to-cl using the complex component type
Liam Healy [Sat, 27 Nov 2010 18:53:50 +0000] 
Rewrite complex-to-cl using the complex component type

Rewrite the function complex-to-cl to properly use complex component
type instead of always using double float.  This fixes two errors in
GSLL which do calculations on (complex single-float).  The body of the
function is based on the form that FSBV generates for
foreign-object-components.  Function relocated from
number-conversion.lisp to complex-types.lisp

2 years agoUpdated documentation to include declarations and using quicklisp to install
Liam Healy [Thu, 25 Nov 2010 15:45:00 +0000] 
Updated documentation to include declarations and using quicklisp to install

2 years agoFix grid:gsetf macro
Liam M. Healy [Mon, 22 Nov 2010 15:44:29 +0000] 
Fix grid:gsetf macro

2 years agoDefine faref and set-faref macros to expand array element access
Liam Healy [Sun, 21 Nov 2010 04:30:40 +0000] 
Define faref and set-faref macros to expand array element access

The macros faref and set-faref are defined to expand array element
access most efficiently.  They take an explicit 'type-declaration
argument, which may be nil.  If nil, they expand to forms with
run-time evaluated values.  If there is a non-nil type given, they
expand to the appropriate cffi:mem-aref.  These are used by all gref,
gref*, (setf gref) and (setf gref*) methods, general and specific, and
by compiler macros that look for declarations.  It is not clear if and
how the setf macros are being expanded properly, but it is hoped that
the 'gsetf macro (which could be a shadow of cl:setf) will help insure
that maximum use is made of any declarations.

2 years agoFix error in type specification for complex types
Liam M. Healy [Fri, 19 Nov 2010 22:13:19 +0000] 
Fix error in type specification for complex types

2 years agoAuthor: Liam M. Healy <lnp@healy.washington.dc.us>
Liam M. Healy [Mon, 15 Nov 2010 23:20:43 +0000] 
Author: Liam M. Healy <lnp@healy.washington.dc.us>
--- log message follows this line ---
Start macro faref for direct access the foreign arrays

2 years agoRemove some &key and &rest arguments to avoid unused variable warnings
Liam M. Healy [Mon, 15 Nov 2010 15:32:37 +0000] 
Remove some &key and &rest arguments to avoid unused variable warnings

2 years agoAdd a (setf gref*) compiler macro and timing test
Liam Healy [Mon, 15 Nov 2010 03:23:12 +0000] 
Add a (setf gref*) compiler macro and timing test

A compiler macro is now defined for (setf gref*); however, it will not
be invoked for the common case of using the setf macro.  Instead, it
is necessary to funcall #'(setf gref*) at least in SBCL because the
setf macro gets expanded in new variables which are then not declared.
Added a foreign-array timing test.

2 years agoCompiler macro for gref that expands to gref*
Liam Healy [Sun, 14 Nov 2010 22:57:49 +0000] 
Compiler macro for gref that expands to gref*

The compiler macro for gref that expands to gref* now is specific to a
foreign-array type and thus requires a declaration, because it's
probably not good for CL arrays.  It also now works on matrix types,
linearizing the array appropriately according to the declared
dimensions.  There is now a helper function using-declared-type used
in the compiler macros for gref and gref*.

2 years agoPut declarations in gref* and (setf gref*) definitions
Liam Healy [Sun, 14 Nov 2010 00:30:12 +0000] 
Put declarations in gref* and (setf gref*) definitions

Added declarations of inputs and outputs and intermediate quantities
in gref* and (setf gref*).

2 years agoMap element type to CFFI form for complex types
Liam Healy [Sat, 13 Nov 2010 01:38:02 +0000] 
Map element type to CFFI form for complex types

2 years agoFix error in reading declaration of foreign array
Liam M. Healy [Mon, 8 Nov 2010 16:35:33 +0000] 
Fix error in reading declaration of foreign array

Fixed an error in declared-type-dimensions which had an assumption
that the declaration is a list.  Declare forms do work in SBCL
1.0.43.79.

Example form:
(defun foreign-array-test (dim)
  "Test for foreign-array speed, adapted from Sebastian Sturm's code."
  (let ((input (grid:make-foreign-array
'double-float :dimensions dim
:initial-element 1.0d0))
(output (grid:make-foreign-array 'double-float :dimensions dim)))
    (declare (type grid:vector-double-float input output))
    (let ((tv0 0.0d0) (tv1 0.0d0))
      (declare (type double-float tv0 tv1))
      (iter (for i from 0 below dim)
    (setf tv0 0.0d0)
    (iter (for m from 0 to i)
  (iter (for n from i below dim)
(setf tv1 0.0d0)
(iter (for k from m to n)
      (incf tv1 (the double-float (grid:gref input k))))
(incf tv0 (expt tv1 -2))))
    (setf (grid:gref output i)
  (- (the double-float (grid:gref input i)) tv0))))))
Results
(time (foreign-array-test 100))
Evaluation took:
  0.125 seconds of real time
  0.124008 seconds of total run time (0.124008 user, 0.000000 system)
  99.20% CPU
  382,132,350 processor cycles
  8,240 bytes consed

2 years agoMove compiler macros applicable to foreign-array only to that system
Liam Healy [Mon, 8 Nov 2010 03:39:20 +0000] 
Move compiler macros applicable to foreign-array only to that system

2 years agoType declarations for foreign-arrays
Liam Healy [Sun, 7 Nov 2010 22:47:19 +0000] 
Type declarations for foreign-arrays

Accept 'the type declarations for foreign arrays subtypes for speed
improvement of gref*.  This currently works on gref* and not (setf
gref*), and produces approximately 30x speed improvement.  Also added
ability to read a traditional declaration, e.g. (type
vector-double-float zvector), which relies on the CLtL2 function
variable-information and thus is not portable (SBCL only at present);
however, this function always returns nil for the third value (type
declaration) when tested.

2 years agoAccelerate foreign-array computations
Liam Healy [Sun, 7 Nov 2010 20:34:23 +0000] 
Accelerate foreign-array computations

By defining gref methods specific to each class
(e.g. vector-double-float) that then calls cffi:mem-aref with an
explicit element type, the speed of gref and (setf gref) are greatly
increased.  Also, define a compiler macro that turns the gref into
gref* for vectors; speed improvement results from this
appear inexplicably minimal.

2 years agoDefinition of stride selection
Liam Healy [Fri, 27 Aug 2010 03:31:42 +0000] 
Definition of stride selection

Select elements by stride from a grid.  For example
(grid:stride #(1 2 3 4 5 6 7 8) 3)
#(1 4 7)

2 years agoExtend lisp-unit tests to include foreign-arrays
Liam Healy [Mon, 23 Aug 2010 02:13:33 +0000] 
Extend lisp-unit tests to include foreign-arrays

2 years agoImproved docstring for copy-to.
Liam M. Healy [Thu, 19 Aug 2010 20:42:41 +0000] 
Improved docstring for copy-to.

2 years agoChange split-sequence package to split-sequence
Liam M. Healy [Fri, 13 Aug 2010 18:02:24 +0000] 
Change split-sequence package to split-sequence

2 years agoDefault grid type, zero non-diagonal elements of identity, combine destination
Liam M. Healy [Thu, 22 Jul 2010 21:54:54 +0000] 
Default grid type, zero non-diagonal elements of identity, combine destination

Functions that take an explicit grid type as an argument now default
to *default-grid-type* instead of 'array.  Set :initial-element to
non-diagonal elements of the identity-matrix to zero.  Default
combine-destination to T in map-n-grids if an :initial-element is
supplied.

2 years agoFix initialization of complex when not done through static-vectors
Liam M. Healy [Tue, 20 Jul 2010 21:53:38 +0000] 
Fix initialization of complex when not done through static-vectors

The logic was wrong on initialize-instance :after foreign-array when
static-vectors are not used and complex arrays (regardless of whether
static-vectors is supported on the implementation).  So now CCL 64 has
a reasonably good pass rate:
TOTAL: 4002 assertions passed, 18 failed, 0 execution errors.

2 years agoAdd dependency
Liam M. Healy [Tue, 20 Jul 2010 21:05:15 +0000] 
Add dependency

2 years agoNew function matrix-into-columns
Liam M. Healy [Tue, 20 Jul 2010 15:06:10 +0000] 
New function matrix-into-columns

2 years agoChange the default for :combine-destination in map-n-grids, add documentation
Liam Healy [Tue, 20 Jul 2010 01:53:24 +0000] 
Change the default for :combine-destination in map-n-grids, add documentation

2 years agoNo static-vectors for complex arrays in CCL
Liam M. Healy [Mon, 19 Jul 2010 22:34:33 +0000] 
No static-vectors for complex arrays in CCL

Static vectors are evidently not possible with complex arrays in CCL;
error was:  (COMPLEX SINGLE-FLOAT) is not an ivector subtype.  Thus
the element-type and implementation are checked in the
initialize-instance :after method for foreign-array.

2 years agoAdded documentation for simplified generalized arrays
Liam Healy [Mon, 19 Jul 2010 02:49:11 +0000] 
Added documentation for simplified generalized arrays

2 years agoSimplify map-n-grids sources argument and add explanation of arguments
Liam Healy [Sun, 18 Jul 2010 04:35:04 +0000] 
Simplify map-n-grids sources argument and add explanation of arguments

Each source, an element of 'sources, is a list (grid-or-function
affi).  The creation of an affi from dimensions is done in map-grid.
Added significant documentation explaining map-n-grids arguments.

2 years agoSimple loop in map-n-grids, added some documentation
Liam M. Healy [Fri, 16 Jul 2010 13:40:04 +0000] 
Simple loop in map-n-grids, added some documentation

2 years agoRemove symbol 'clone
Liam Healy [Fri, 16 Jul 2010 03:14:13 +0000] 
Remove symbol 'clone

2 years agoSet initial-element in foreign-array correctly
Liam M. Healy [Thu, 15 Jul 2010 22:22:35 +0000] 
Set initial-element in foreign-array correctly

Set initial-element in foreign-array correctly; it was not correct for
#-static-vectors and complex element type.  Also possibly redundant
keys in make-grid-data.

2 years agoKeyword argument initial-element in map-n-grids
Liam M. Healy [Thu, 15 Jul 2010 13:44:09 +0000] 
Keyword argument initial-element in map-n-grids

Keyword argument initial-element in map-n-grids and map-grid replaces
old default-value.  It defaults to nil and if nil, there is no
initial-element used in creating the grid.  If a number, it will be
coerced to the right type by coerce-value.

2 years agoComplex arrays are settable and usable if #-static-vectors
Liam Healy [Thu, 15 Jul 2010 03:25:19 +0000] 
Complex arrays are settable and usable if #-static-vectors

Complex arrays are settable and usable if #-static-vectors; in the
case of initialization with :initial-contents, the contents are looped
over with (setf gref) on each element.  In the case of (setf gref*),
the previous restriction preventing the use of complex vectors for
#-static-vectors was unnecessary as it works as-is.  Return the value
at the end of the (setf gref*) function, as required by the CL
standard.

2 years agoCorrect :initarg for foreign-pointer slot in defclass foreign-array
Liam Healy [Sun, 11 Jul 2010 03:29:28 +0000] 
Correct :initarg for foreign-pointer slot in defclass foreign-array

2 years agoMerge branch 'convert' of ssh://repo.or.cz/srv/git/gsd into convert
Liam Healy [Sat, 10 Jul 2010 18:15:33 +0000] 
Merge branch 'convert' of ssh://repo.or.cz/srv/git/gsd into convert

2 years agoExport symbol read-data-file
Liam M. Healy [Fri, 9 Jul 2010 21:42:01 +0000] 
Export symbol read-data-file

2 years agoMerge branch 'convert' of ssh://repo.or.cz/srv/git/gsd into convert
Liam Healy [Fri, 9 Jul 2010 00:38:24 +0000] 
Merge branch 'convert' of ssh://repo.or.cz/srv/git/gsd into convert

2 years agoSimplify make-foreign-array-from-pointer
Liam M. Healy [Thu, 8 Jul 2010 22:07:55 +0000] 
Simplify make-foreign-array-from-pointer

Simplify make-foreign-array-from-pointer by making use of the
:finalizer argument in initialize-instance :after.

2 years agoSet the complex array elements correctly; (create-complex-matrix 2)
Liam Healy [Thu, 8 Jul 2010 03:18:03 +0000] 
Set the complex array elements correctly; (create-complex-matrix 2)

Set the complex array elements using (setf fsbv:object) for the
complex types; (create-complex-matrix 2) now works.

2 years agoMerge branch 'convert' of ssh://repo.or.cz/srv/git/gsd into convert
Liam Healy [Thu, 8 Jul 2010 01:21:05 +0000] 
Merge branch 'convert' of ssh://repo.or.cz/srv/git/gsd into convert

Conflicts:

foreign-array/foreign-array.lisp

2 years agoHandler and restart for using cl-array, non-functional
Liam Healy [Thu, 8 Jul 2010 01:19:30 +0000] 
Handler and restart for using cl-array, non-functional

2 years agoNew function grid:copy-to, more robust read, check complex arrays
Liam M. Healy [Wed, 7 Jul 2010 18:53:39 +0000] 
New function grid:copy-to, more robust read, check complex arrays

2 years agoSystem dependence on split-sequence and alexandria
Liam M. Healy [Wed, 7 Jul 2010 14:02:59 +0000] 
System dependence on split-sequence and alexandria

2 years agoRead data from a file
Liam M. Healy [Tue, 6 Jul 2010 19:07:19 +0000] 
Read data from a file

2 years agoDefine #'copy for grids
Liam Healy [Tue, 6 Jul 2010 02:50:46 +0000] 
Define #'copy for grids

2 years agoUse destination-specification for grids made from functions
Liam Healy [Mon, 5 Jul 2010 20:15:39 +0000] 
Use destination-specification for grids made from functions

Making grids from functions with map-grid no longer assumes a
particular grid type or element type, so the
:destination-specification has to be given.  The dimensions of the
source are assumed to be the same as the destination if source-dims is
not given.

2 years agoEliminate gtype and use specification instead in map functions
Liam Healy [Sun, 4 Jul 2010 03:35:56 +0000] 
Eliminate gtype and use specification instead in map functions

Eliminate gtype and use specification instead in map functions; two
tests fail.

2 years agoNew function make-specification, renamed function make-specification-gt
Liam Healy [Sat, 3 Jul 2010 20:18:41 +0000] 
New function make-specification, renamed function make-specification-gt

New function make-specification makes a specification form from the
type, dimensions, and element-type.  Renamed function
make-specification-gt was make specification, and makes the
specification from the AFFI and gtype.  Moved pure-cl-array-p to
multiarray.lisp because it was only used by the compound make-grid
there.

2 years agoMove copy.lisp to grid from foreign-array
Liam Healy [Fri, 2 Jul 2010 01:58:02 +0000] 
Move copy.lisp to grid from foreign-array

2 years agoMove #'metadata-slot here from GSLL
Liam M. Healy [Wed, 30 Jun 2010 22:01:37 +0000] 
Move #'metadata-slot here from GSLL

2 years agoDelete unused files, move/rename make-foreign-array from GSLL
Liam Healy [Wed, 30 Jun 2010 02:53:11 +0000] 
Delete unused files, move/rename make-foreign-array from GSLL

2 years agoNew function foreign-array-from-pointer
Liam Healy [Wed, 30 Jun 2010 01:46:12 +0000] 
New function foreign-array-from-pointer

New function foreign-array-from-pointer, restore #'element-size,
expand definition of data-class-name.

2 years agoMake foreign-array with the appropriate subclass
Liam M. Healy [Tue, 29 Jun 2010 12:59:47 +0000] 
Make foreign-array with the appropriate subclass

Make foreign-array with the appropriate subclass such as
vector-double-float, instead of making it as foreign-array and then
changing the class.  This helps when making objects in a subclass of
the subclass, so that it doesn't try to change it back to the parent
subclass (e.g., 'gsl:permutation is a subclass of
'vector-unsigned-byte-64).

2 years agoCheck for proper element-type, add dependency
Liam Healy [Tue, 29 Jun 2010 02:02:02 +0000] 
Check for proper element-type, add dependency

Check for proper element-type when intializing an instance of
foreign-array.  Add dependency to file.

2 years agoSpecification without dimensions
Liam M. Healy [Mon, 28 Jun 2010 15:13:40 +0000] 
Specification without dimensions

Specification without dimensions puts parentheses around the component
(grid) type.

2 years agoFix make-grid
Liam Healy [Mon, 28 Jun 2010 02:33:01 +0000] 
Fix make-grid

2 years agoExport 'data-class-name
Liam Healy [Mon, 28 Jun 2010 02:01:38 +0000] 
Export 'data-class-name

2 years agoOptional argument :foreign-metadata in making foreign-array
Liam Healy [Sun, 27 Jun 2010 12:55:17 +0000] 
Optional argument :foreign-metadata in making foreign-array

2 years agoAdd slot foreign-metadata
Liam Healy [Sun, 27 Jun 2010 03:10:16 +0000] 
Add slot foreign-metadata

2 years agoSubclasses for vectors and matrices
Liam Healy [Sat, 26 Jun 2010 23:38:08 +0000] 
Subclasses for vectors and matrices

Define subclasses of foreign-array 'mvector and 'matrix, and
subclasses of those by element type.  The definitions have mostly been
moved from GSLL.  Remove all reference to GSL.  Restore use of
static-vectors.

2 years agoComment/reference on work to be done for complex arrays on non-static-vectors
Liam Healy [Fri, 25 Jun 2010 02:53:10 +0000] 
Comment/reference on work to be done for complex arrays on non-static-vectors

2 years agoAdd make-load-form for foreign-array
Liam Healy [Fri, 25 Jun 2010 00:08:58 +0000] 
Add make-load-form for foreign-array

2 years agoConditionalize #-static-vectors correctly in initialize-instance
Liam M. Healy [Thu, 24 Jun 2010 13:40:10 +0000] 
Conditionalize #-static-vectors correctly in initialize-instance

The #-static-vectors case would not compile because of incorrect
conditionalizations; this is now fixed.  The push of :static-vectors
on *features* remains commented out for further testing and
development.

2 years agoPrint foreign arrays readably with #m
Liam Healy [Wed, 23 Jun 2010 02:58:49 +0000] 
Print foreign arrays readably with #m

2 years agoUse fsbv:object to convert complex array elements to CL
Liam Healy [Wed, 23 Jun 2010 02:36:03 +0000] 
Use fsbv:object to convert complex array elements to CL

2 years agoReader macro #m for foreign arrays
Liam Healy [Mon, 21 Jun 2010 02:32:30 +0000] 
Reader macro #m for foreign arrays

Moved definition of #m to foreign-array from GSLL so that plain
foreign array is made.  This works for #m, #3m (single float) and #31m
(signed 32 bit); complex #2m seems to work but gref returns a foreign
pointer and not the complex number.

2 years agoTests of foreign arrays
Liam Healy [Sun, 20 Jun 2010 23:08:45 +0000] 
Tests of foreign arrays

2 years agoRestore array tests
Liam Healy [Sun, 20 Jun 2010 15:17:45 +0000] 
Restore array tests

Tests on CL arrays have been restored using #'test-grid-double-float
and #'contents, and all pass
TOTAL: 48 assertions passed, 0 failed, 0 execution errors.

2 years agoSample grid generation of any type
Liam Healy [Sun, 20 Jun 2010 03:14:13 +0000] 
Sample grid generation of any type

The sample grids that were bound to specials are now generated with a
new function #'test-grid-double-float that will make grids of any type
and dimension.  Updated the documentation to use this function.

2 years agoNew function #'contents returns nested list of contents
Liam Healy [Sun, 20 Jun 2010 02:44:18 +0000] 
New function #'contents returns nested list of contents

New function #'contents returns nested list of contents, and this is
now used for the print-object method of foreign-array.  It is also
suitable for an :initial-contents argument to make a new array.

2 years agoRearrange and clean up code
Liam Healy [Sat, 19 Jun 2010 23:40:49 +0000] 
Rearrange and clean up code

2 years agoSingle package, transpose now works for foreign-array
Liam Healy [Sat, 19 Jun 2010 23:15:42 +0000] 
Single package, transpose now works for foreign-array

1. Eliminate the :foreign-array package and make all in :grid package.
2. Push foreign-array onto *grid-types*.
3. Coerce initial-element to the right type.
4. Added a grid-rank method.
5. Call function #'dimensions instead of #'grid-dimensions.
6. As a result, transpose now works on both array and foreign-array.

2 years agoMake (setf grid:gref*) a method, grid:element-type a generic function
Liam Healy [Sat, 19 Jun 2010 20:49:45 +0000] 
Make (setf grid:gref*) a method, grid:element-type a generic function

2 years agoFortran arrays with initial-contents
Liam Healy [Sat, 19 Jun 2010 19:43:38 +0000] 
Fortran arrays with initial-contents

Fortran (column-major) arrays are now set correctly with
initial-contents, as demonstrated for example with
 (make-grid '((farr:foreign-array 2 2) double-float)
     :initial-contents '((1.0d0 2.0d0) (3.0d0 4.4d0))
     :linearization :column-major)
All "C-array" designations have been changed to "foreign-array";
package nickname :farr.

2 years agoFortran (column-major) arrays support
Liam Healy [Sat, 19 Jun 2010 14:14:39 +0000] 
Fortran (column-major) arrays support

Fortran (column-major) arrays support added, except :initial-contents
needs to be transposed.

2 years agoMake 'array and 'foreign-array; sepation of multiarrays, step 2
Liam Healy [Fri, 18 Jun 2010 02:45:08 +0000] 
Make 'array and 'foreign-array; sepation of multiarrays, step 2

It is now possible to make an array
(make-grid '((array 2 2) double-float) :initial-contents '((1.0d0 2.0d0) (3.0d0 4.4d0)))
and a foreign-array
(make-grid '((c-array:foreign-array 2 2) double-float) :initial-contents '((1.0d0 2.0d0) (3.0d0 4.4d0)))
but all the mechanics for multiarrays (lists, arrays of arrays, etc.)
has pushed into multiarrays.lisp which is not loaded and probably
won't compile.

2 years agoSeparation of "multiarrays", step 1 convert
Liam Healy [Thu, 17 Jun 2010 04:27:47 +0000] 
Separation of "multiarrays", step 1

What was the inclusive (except for CL array) 'grid class is being
moved aside as a "multiarray" class, to leave simpler classes (array
and foreign-array) from which we build up.

2 years agoMultidimensional foreign-array, define make-grid-data
Liam Healy [Wed, 16 Jun 2010 02:54:09 +0000] 
Multidimensional foreign-array, define make-grid-data

2 years agoBuild foreign-array on static-vectors if available; (setf grid-ref) method
Liam Healy [Tue, 15 Jun 2010 03:08:24 +0000] 
Build foreign-array on static-vectors if available; (setf grid-ref) method

2 years agoNo superclass for foreign-array
Liam Healy [Mon, 14 Jun 2010 03:01:47 +0000] 
No superclass for foreign-array

Change class definition so that foreign-array is not a subclass of
grid, it stands on its own parallel to e.g. CL array.  So far
instantiation works for vectors, and grid-ref is defined.  It needs
some thought on indices (linearized vs. delinearized).

2 years agoClass foreign-array for pure foreign array, no Lisp counterpart
Liam Healy [Thu, 10 Jun 2010 03:24:37 +0000] 
Class foreign-array for pure foreign array, no Lisp counterpart

Class foreign-array for pure foreign array, no Lisp counterpart
started.  Still needs work in grid:make-grid-data, and gref, (setf
gref) in terms of gref* and (setf gref*).

2 years agoClass foreign-array has two subclasses: duplicated-array and shared-array
Liam Healy [Wed, 9 Jun 2010 03:24:17 +0000] 
Class foreign-array has two subclasses: duplicated-array and shared-array

The foreign-array class has two subclasses: duplicated-array and
shared-array, and everything is instantiated in one of those two
classes.  The former is built on static-vectors, and the latter is
keeps two copies of the data.  Both classes basically function but
duplicated-array still needs some more initialization options and
testing.

2 years agoNew class static-arrays
Liam Healy [Tue, 8 Jun 2010 03:17:52 +0000] 
New class static-arrays

New grid class static-arrays uses Stelian Ionescu's static vectors.
It is possible to make one and two dimensional double-float arrays.
New function grid::total-size-from-dimension.

3 years agoPermit :initial-contents as an argument to #'make-grid-data initial-contents
Liam Healy [Tue, 25 May 2010 03:00:02 +0000] 
Permit :initial-contents as an argument to #'make-grid-data

Permit :initial-contents as an argument to all methods of
#'make-grid-data.  This currently works for gsl:marray and array, but
not for list or c-array:foreign-array.

3 years agoMerge branch 'master' of ssh://repo.or.cz/srv/git/gsd final-ffa
Liam Healy [Sun, 23 May 2010 14:26:40 +0000] 
Merge branch 'master' of ssh://repo.or.cz/srv/git/gsd

3 years agoCopy argument list in set-position; otherwise it is destructive
Liam Healy [Sun, 23 May 2010 14:25:52 +0000] 
Copy argument list in set-position; otherwise it is destructive

Copy argument list in set-position.  Without copying, the original
list is changed which was affecting the dimension list when a subgrid
was selected.  New error message when attempting to create a grid
including a dimension of zero.

3 years agoReturn the CL array from copy-array-from-pointer
Liam M. Healy [Mon, 26 Apr 2010 13:56:25 +0000] 
Return the CL array from copy-array-from-pointer

3 years agoNew function copy-foreign-vector
Liam Healy [Mon, 26 Apr 2010 01:38:56 +0000] 
New function copy-foreign-vector

New function copy-foreign-vector will copy the number of elements
requested from the foreign pointer into a foreign-friendly CL array.

3 years agoIn map-n-grids, iterate until "next" source walker returns nil
Liam Healy [Sun, 28 Mar 2010 20:10:22 +0000] 
In map-n-grids, iterate until "next" source walker returns nil

In map-n-grids, iterate until "next" source walker returns nil, not
until the walker itself is nil.  This fixes an error reported by Mirko
Vukovic,
http://common-lisp.net/pipermail/gsll-devel/2010q1/000443.html.  The
two "inject diagonal" tests that were in comments in the map.lisp file
in which there were errors have now been added as formal tests in the
'diagonal test in compose.lisp.  A check-type has been added to gref*
to give a more meaningful (and consistent between implementations)
error should that function be called with a nil argument for the
index.  This can be removed if efficiency is a concern.

3 years agoReturn a list from defmethod grid-dimensions ((grid grid))
Liam Healy [Sun, 21 Feb 2010 02:40:38 +0000] 
Return a list from defmethod grid-dimensions ((grid grid))

3 years agoQuote lambda forms in iterate extensions so that they will compile
Liam Healy [Tue, 9 Feb 2010 20:23:17 +0000] 
Quote lambda forms in iterate extensions so that they will compile

3 years agoFix error in make-destination-gtype, new function make-gtype
Liam Healy [Sun, 7 Feb 2010 19:47:34 +0000] 
Fix error in make-destination-gtype, new function make-gtype

Fix error in make-destination-gtype in which it would ignore
destination-affi if it wasn't a CL array.  Made new function
make-gtype that replaces make-array-gtype but generalizes to any grid
type.  This fixes the bug reported by Mirko Vukovic Tue, Jan 12, 2010
at 10:42 AM reporting an error when trying to find the diagonal of a
GSLL marray.

3 years agoDuplicate #'remove-position, fix arguments to #'error
Liam M. Healy [Wed, 20 Jan 2010 19:50:53 +0000] 
Duplicate #'remove-position, fix arguments to #'error

The function remove-position in the grid package has been duplicated
in AFFI because it's needed there also; these should be unified.
Fixed the number of arguments in error call.

3 years agoDon't check that each dimension is positive
Liam Healy [Sun, 17 Jan 2010 23:10:27 +0000] 
Don't check that each dimension is positive

In AFFI, don't check that each dimension is positive, because GSLL at
least needs to make zero-length foreign arrays for combination.  This
didn't seem to be a problem to SBCL, but it was for CCL.

3 years agoExplicit package for 'gridp and 'grid-rank; export 'gridp
Liam M. Healy [Wed, 6 Jan 2010 13:35:50 +0000] 
Explicit package for 'gridp and 'grid-rank; export 'gridp

In iterate.lisp, which has default package :iter, use the explicit
package 'grid:gridp and 'grid:grid-rank.  Export the symbol 'gridp
from the :grid package.

3 years agoAdd affi transformer #'extrude with tests
Liam Healy [Sat, 2 Jan 2010 23:16:26 +0000] 
Add affi transformer #'extrude with tests

The transformer #'extrude will create a new AFFI that makes the grid
look as if it has an additional dimension, with each element
replicated along that dimension.  Two tests added.
Further splitting of affi creation functions.
TOTAL: 47 assertions passed, 0 failed, 0 execution errors.

3 years agoReturn the magnitude from normalize as second value
Liam Healy [Sat, 2 Jan 2010 15:48:35 +0000] 
Return the magnitude from normalize as second value

Return the magnitude (normalization factor) as a second value from
normalize.

3 years agoNew make-affi-int; gtype can take grid; change to utility packages
Liam Healy [Fri, 1 Jan 2010 21:44:05 +0000] 
New make-affi-int; gtype can take grid; change to utility packages

New function make-affi-int split out from make-affi.  Function gtype
can take a grid directly and will look up the specification.  Use
alexandria instead of cl-utilities because CFFI already needs
alexandria which supplies with-unique-names, the only function used
from cl-utilities.

3 years agoAdd grid-iterate-extension
Liam Healy [Fri, 1 Jan 2010 17:00:54 +0000] 
Add grid-iterate-extension

Macro extension for iterate over grids, with some documentation.

3 years agoRemove dependency on iterate package
Liam Healy [Fri, 1 Jan 2010 04:14:07 +0000] 
Remove dependency on iterate package