diff --git a/data/data.lisp b/data/data.lisp index 21f79743a896efcffd86c9eb0f43feb78ac78a54..a7e7b7b74f37905eff7667194ea27aa9584f92b3 100644 --- a/data/data.lisp +++ b/data/data.lisp @@ -1,6 +1,7 @@ -;; Data using ffa -;; Liam Healy 2008-04-06 21:23:41EDT data-ffa.lisp -;; Time-stamp: <2008-11-02 17:38:20EST data.lisp> +;; "Data" is bulk arrayed data, like vectors, matrices, permutations, +;; combinations, or histograms. +;; Liam Healy 2008-04-06 21:23:41EDT +;; Time-stamp: <2008-11-11 21:37:21EST data.lisp> ;; $Id$ (in-package :gsl) @@ -58,7 +59,7 @@ (defun element-size (object) "The size of each element as stored in C." - (cffi:foreign-type-size (cl-ffa (element-type object)))) + (cffi:foreign-type-size (cl-cffi (element-type object)))) ;;;;**************************************************************************** ;;;; Definition of specific data classes @@ -134,7 +135,7 @@ ;;;;**************************************************************************** (defun component-type (eltype) - (cl-ffa (component-float-type eltype))) + (cl-cffi (component-float-type eltype))) (defun component-size (object) (if (subtypep (element-type object) 'complex) diff --git a/data/maref.lisp b/data/maref.lisp index a53737271c527373b4a49b8e47aa746209a5b832..2c5f572320faa4377ffaa7934050ba17d8ef24bd 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: <2008-08-31 11:07:34EDT maref.lisp> +;; Time-stamp: <2008-11-11 21:37:44EST maref.lisp> ;; $Id: $ (in-package :gsl) @@ -128,8 +128,8 @@ category tp) ,@ffrestargs ,@(if value-symbol - (list (cl-ffa tp) value-symbol) - (list (cl-ffa tp)))))) + (list (cl-cffi tp) value-symbol) + (list (cl-cffi tp)))))) *array-element-types*)))) (defmethod maref diff --git a/init/defmfun.lisp b/init/defmfun.lisp index 4b2b365c8f89e85de7a4ce975500bc8696f5ead8..ccb7d325b2b68a5e0780c323383d1787abbf7ab7 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: <2008-11-09 11:11:50EST defmfun.lisp> +;; Time-stamp: <2008-11-11 21:37:46EST defmfun.lisp> ;; $Id$ (in-package :gsl) @@ -263,7 +263,7 @@ gsl-function-name))) (remf key-args :documentation) (when (eq c-return :element-c-type) - (setf (getf key-args :c-return) (cl-ffa eltype))) + (setf (getf key-args :c-return) (cl-cffi eltype))) (when (eq c-return :component-float-type) (setf (getf key-args :c-return) (component-type eltype))) (if (and (llkp arglist) (listp (first gsl-name))) ; ad-hoc detection! @@ -396,7 +396,7 @@ (make-st (st-symbol v) (if (eq (st-type v) :component-float-type) (component-type element-type) - (cl-ffa element-type))) + (cl-cffi element-type))) v)) c-arguments)) diff --git a/init/element-types.lisp b/init/element-types.lisp index cb40b84e149af868454d0e365014973066730900..4650b9b779c51746010fd0606e590cc57a2fbfb5 100644 --- a/init/element-types.lisp +++ b/init/element-types.lisp @@ -1,19 +1,19 @@ ;; Mapping of element type names ;; Liam Healy 2008-04-13 11:22:46EDT element-types.lisp -;; Time-stamp: <2008-09-14 18:09:39EDT element-types.lisp> +;; Time-stamp: <2008-11-11 21:34:47EST element-types.lisp> ;; $Id$ ;;; The different element type forms: -;;; C standard full :unsigned-char -;;; GSL splice name "uchar" -;;; C explicit :uint8 (not used here) -;;; CL '(unsigned-byte 8) -;;; Single 'unsigned-byte-8 +;;; C standard full, or "CFFI" :unsigned-char +;;; GSL splice name "uchar" +;;; C explicit :uint8 (not used here) +;;; CL '(unsigned-byte 8) +;;; Single 'unsigned-byte-8 ;;; Functions to perform conversions ;;; CL -> single in function #'cl-single ;;; CL -> GSL in function #'cl-gsl -;;; CL -> Cstd in function #'cl-ffa +;;; CL -> CFFI (Cstd) in function #'cl-cffi ;;; CFFI (Cstd) -> CL in function #'cffi-cl ;;; Sources of equivalence @@ -181,12 +181,12 @@ (concatenate 'string "_" string) string))) -(defun cl-ffa (cl-type) - "The FFA/CFFI element type from the CL type." +(defun cl-cffi (cl-type) + "The CFFI element type from the CL type." (lookup-type (clean-type cl-type) *cstd-cl-type-mapping* t)) (defun cffi-cl (cffi-type) - "The CL type from the FFA/CFFI element type." + "The CL type from the CFFI element type." (unless (eq cffi-type :pointer) (lookup-type cffi-type *cstd-cl-type-mapping*))) @@ -238,9 +238,9 @@ (cerror "Accept gibberish." "Cannot pass complex scalars to and from GSL functions (structs passed by value).") (let* ((cleantype (clean-type (type-of number))) - (comptype (cl-ffa (second cleantype))) + (comptype (cl-cffi (second cleantype))) (datslot - (cffi:foreign-slot-pointer gsl (cl-ffa cleantype) 'dat))) + (cffi:foreign-slot-pointer gsl (cl-cffi cleantype) 'dat))) (setf (cffi:mem-aref datslot comptype 0) (realpart number) (cffi:mem-aref datslot comptype 1) (imagpart number)) gsl)) @@ -280,7 +280,6 @@ (defparameter *array-element-types* (remove-duplicates (all-types *cstd-cl-type-mapping* t) :test 'equal) - ;;(all-types ffa::*cffi-and-lisp-types* t) "All the array element types supported.") (defparameter *array-element-types-no-complex*