diff --git a/data/foreign-friendly.lisp b/data/foreign-friendly.lisp index 2286d05ca70989c42a07f0cb1e43a3a80f3c09fb..748b75f88db332d214a60f56019d6db729390433 100644 --- a/data/foreign-friendly.lisp +++ b/data/foreign-friendly.lisp @@ -1,6 +1,6 @@ ;; Use the foreign-friendly arrays package. ;; Liam Healy 2008-03-22 15:40:08EDT -;; Time-stamp: <2009-05-19 21:32:06EDT foreign-friendly.lisp> +;; Time-stamp: <2009-12-07 22:51:17EST foreign-friendly.lisp> ;; $Id$ ;;; Foreign-friendly arrays (original implementation by Tamas Papp) @@ -23,9 +23,9 @@ "Make an array of one or two dimensions for possible use in foreign code. Syntax is similar to make-array, but note that element-type is mandatory and limited to certain types." - (assert (member element-type *array-element-types* :test 'equal) + (assert (member element-type c-array:*array-element-types* :test 'equal) (element-type) - "Specified element-type must be one of *array-element-types*.") + "Specified element-type must be one of c-array:*array-element-types*.") (let* ((initial-matrix (listp (first initial-contents))) (complex-initial-real (and initial-contents-p diff --git a/data/maref.lisp b/data/maref.lisp index e6b643e5b4659ec9e3e5274b9befbf2a590a85ff..205553444176b41943dc69fdcf1c8b7c2cd6fa29 100644 --- a/data/maref.lisp +++ b/data/maref.lisp @@ -1,6 +1,6 @@ ;; Get/set array or elements: cl-array, maref ;; Liam Healy 2008-08-27 22:43:10EDT maref.lisp -;; Time-stamp: <2009-12-06 19:51:39EST maref.lisp> +;; Time-stamp: <2009-12-07 22:51:18EST maref.lisp> ;; $Id: $ (in-package :gsl) @@ -103,7 +103,7 @@ ,@(if value-symbol (list (c-array:cl-cffi tp) value-symbol) (list (c-array:cl-cffi tp)))))) - *array-element-types*))) + c-array:*array-element-types*))) (defmethod maref ((pointer #.+foreign-pointer-class+) index &optional index2 @@ -125,14 +125,14 @@ ,(actual-gsl-function-name `("gsl_" :category :type ,"_get") 'vector tp))) - *array-element-types*) + c-array:*array-element-types*) (mapcar (lambda (tp) `(map-name 'maref ,(actual-gsl-function-name `("gsl_" :category :type ,"_get") 'matrix tp))) - *array-element-types*))) + c-array:*array-element-types*))) (defmethod (setf maref) (value (pointer #.+foreign-pointer-class+) index &optional index2 @@ -154,14 +154,14 @@ ,(actual-gsl-function-name `("gsl_" :category :type ,"_set") 'vector tp))) - *array-element-types*) + c-array:*array-element-types*) (mapcar (lambda (tp) `(map-name '(setf maref) ,(actual-gsl-function-name `("gsl_" :category :type ,"_set") 'matrix tp))) - *array-element-types*))) + c-array:*array-element-types*))) diff --git a/data/marray.lisp b/data/marray.lisp index cd0929366c523c3443d076c56eb8fcbcbf89e6a3..34c2f3d7f3004545af0c8e7020636385646391ce 100644 --- a/data/marray.lisp +++ b/data/marray.lisp @@ -1,6 +1,6 @@ ;; A "marray" is an array in both GSL and CL ;; Liam Healy 2008-04-06 21:23:41EDT -;; Time-stamp: <2009-12-06 19:50:09EST marray.lisp> +;; Time-stamp: <2009-12-07 22:46:41EST marray.lisp> (in-package :gsl) @@ -107,7 +107,7 @@ (pushnew ',(cons class-name element-type-cl) *class-element-type* :test #'equal) (export ',class-name)))) - *array-element-types*))) + c-array:*array-element-types*))) ;;;;**************************************************************************** ;;;; Make data from either the dimensions provided or from the initial values diff --git a/documentation/index.html b/documentation/index.html index 07b695ba3b32b088015e2b5a464f17e183c75d40..469399e4dc8c050d4dc892a59f3c0e37312de57b 100644 --- a/documentation/index.html +++ b/documentation/index.html @@ -277,7 +277,7 @@ GSLL has many functions that work on vectors (one-dimensional arrays) and matrices (two-dimensional arrays). GSLL supports all array element types that are supported by CFFI, the CL implementation, GSL, and the platform. This list is available in the -variable <code>*array-element-types*</code>. On implementations that +variable <code>c-array:*array-element-types*</code>. On implementations that support it (currently only SBCL), the contents are directly available to the GSL functions without copying between the Lisp area and the C area of memory.</p> @@ -450,7 +450,7 @@ and arrays used internally or for function return. <!-- Created: Feb 25 2005 --> <!-- hhmts start --> <small> -Time-stamp: <2009-11-09 15:27:51EST index.html> +Time-stamp: <2009-12-07 22:51:15EST index.html> </small> <!-- hhmts end --> </div> diff --git a/init/element-types.lisp b/grid/element-types.lisp similarity index 83% rename from init/element-types.lisp rename to grid/element-types.lisp index bf044868c9585d4c7178eb720deb9f14b8ee02ad..49a19159b5b9a630a31d6e8d50938d66444d8268 100644 --- a/init/element-types.lisp +++ b/grid/element-types.lisp @@ -1,16 +1,19 @@ ;; Mapping of element type names ;; Liam Healy 2008-04-13 11:22:46EDT element-types.lisp -;; Time-stamp: <2009-12-06 19:50:12EST element-types.lisp> +;; Time-stamp: <2009-12-07 22:51:13EST element-types.lisp> ;; $Id$ -(in-package :gsl) +(in-package :c-array) +(export '(*array-element-types* *array-element-types-no-complex* + *float-complex-types* *float-types* *complex-types* + *double-types* element-types)) ;;;;**************************************************************************** ;;;; Common element type groups for generic functions ;;;;**************************************************************************** (defparameter *array-element-types* - (remove-duplicates (c-array:all-types c-array:*cstd-cl-type-mapping* t) :test 'equal) + (remove-duplicates (all-types *cstd-cl-type-mapping* t) :test 'equal) "All the array element types supported.") (defparameter *array-element-types-no-complex* diff --git a/gsll.asd b/gsll.asd index 32d6d53a45c0d4e809688a1c374c780599adfb15..f4a5b2038a7755048cde27b2670a91758153ba7a 100644 --- a/gsll.asd +++ b/gsll.asd @@ -1,6 +1,6 @@ ;; Definition of GSLL system ;; Liam Healy -;; Time-stamp: <2009-12-06 22:14:49EST gsll.asd> +;; Time-stamp: <2009-12-07 22:58:36EST gsll.asd> (when (asdf:find-system :fsbv nil) (pushnew :fsbv *features*)) @@ -20,7 +20,8 @@ :components ((:file "pkgdcl") (:file "types" :depends-on ("pkgdcl")) - (:file "complex-types" :depends-on ("types")))) + (:file "complex-types" :depends-on ("pkgdcl" "types")) + (:file "element-types" :depends-on ("pkgdcl")))) (:module init :depends-on (grid) :components @@ -41,12 +42,9 @@ (cffi-grovel:grovel-file "callback-struct" :depends-on ("types" "libgsl")) (:file "funcallable" :depends-on ("utility")) - (:file "element-types" :depends-on ("init")) (:file "interface" - :depends-on ("init" "conditions" "element-types" - "number-conversion")) - (:file "defmfun" - :depends-on ("init" "forms" "element-types" "interface")) + :depends-on ("init" "conditions" "number-conversion")) + (:file "defmfun" :depends-on ("init" "forms" "interface")) (:file "defmfun-array" :depends-on ("defmfun" "callback-included")) (:file "defmfun-single" diff --git a/init/defmfun-array.lisp b/init/defmfun-array.lisp index f2cade5925141504768e01e8028158b43cfce067..2bdc5cbf55ca10d14d56a74c473c9e71e0661c02 100644 --- a/init/defmfun-array.lisp +++ b/init/defmfun-array.lisp @@ -1,6 +1,6 @@ ;; Helpers for defining GSL functions on arrays ;; Liam Healy 2009-01-07 22:01:16EST defmfun-array.lisp -;; Time-stamp: <2009-12-06 22:05:00EST defmfun-array.lisp> +;; Time-stamp: <2009-12-07 22:55:39EST defmfun-array.lisp> ;; $Id: $ (in-package :gsl) @@ -104,7 +104,7 @@ (actual-gfn gsl-name) (actual-element-c-type eltype c-arguments) key-args)))) - (element-types element-types)))) + (c-array:element-types element-types)))) (defun actual-gsl-function-name (base-name category type) "Create the GSL or BLAS function name for data from the base name diff --git a/init/defmfun.lisp b/init/defmfun.lisp index 1bd40115f02187124f1b655de0aa86d4b380d636..c05867fc9c97b6a632d61b753bcd4ab3f1a52795 100644 --- a/init/defmfun.lisp +++ b/init/defmfun.lisp @@ -1,6 +1,6 @@ ;; Macro for defining GSL functions. ;; Liam Healy 2008-04-16 20:49:50EDT defmfun.lisp -;; Time-stamp: <2009-11-18 09:14:07EST defmfun.lisp> +;; Time-stamp: <2009-12-07 22:53:35EST defmfun.lisp> (in-package :gsl) @@ -41,7 +41,7 @@ ;;; qualifier A method qualifier such as :after or :before. ;;; element-types ;;; Permissible types for elements of arrays. May be -;;; NIL meaning all of *array-element-types*, :no-complex +;;; NIL meaning all of c-array:*array-element-types*, :no-complex ;;; meaning that list without the complex types, ;;; :float meaning only the float types, :complex only ;;; the complex types, :float-complex both float and complex, diff --git a/init/generate-examples.lisp b/init/generate-examples.lisp index c1a6670bda3dc0704410d0ea92e26cf8378f4372..9d7f95ef16155c1f0e391d5aaf1e15213953aa92 100644 --- a/init/generate-examples.lisp +++ b/init/generate-examples.lisp @@ -1,6 +1,6 @@ ;; Define examples. ;; Liam Healy 2008-09-07 21:00:48EDT generate-tests.lisp -;; Time-stamp: <2009-12-06 22:05:00EST generate-examples.lisp> +;; Time-stamp: <2009-12-07 23:01:41EST generate-examples.lisp> ;; $Id: $ ;;; Define examples that can be displayed by users with the function @@ -148,7 +148,7 @@ form)))) (defun generate-all-array-tests-body (element-types test) - (loop for det in (element-types element-types) + (loop for det in (c-array:element-types element-types) collect (let ((default-element-type det)) (declare (special default-element-type starting-element)) diff --git a/init/types.lisp b/init/types.lisp index fc638033f6f0d38d90e8c1940ad1e759a6485b10..044be978ef5f6a7576450521c474d60c647f579c 100644 --- a/init/types.lisp +++ b/init/types.lisp @@ -1,6 +1,6 @@ ;; Number types used by GSL functions, and specification conversion ;; Liam Healy 2008-12-31 21:06:34EST types.lisp -;; Time-stamp: <2009-12-07 22:26:03EST types.lisp> +;; Time-stamp: <2009-12-07 22:53:34EST types.lisp> ;; $Id: $ (in-package :gsl)