Commit 9fc8126d authored by Liam M. Healy's avatar Liam M. Healy

Explicit package home in grid:foreign-pointer

parent 37f446c7
;; Monte Carlo Integration
;; Liam Healy Sat Feb 3 2007 - 17:42
;; Time-stamp: <2010-08-07 21:41:14EDT monte-carlo.lisp>
;; Time-stamp: <2011-01-10 17:59:20EST monte-carlo.lisp>
;;
;; Copyright 2007, 2008, 2009 Liam M. Healy
;; Copyright 2007, 2008, 2009, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -51,7 +51,7 @@
(scalars t))
"gsl_monte_plain_integrate"
((callback :pointer)
((foreign-pointer lower-limits) :pointer) ((foreign-pointer upper-limits) :pointer)
((grid:foreign-pointer lower-limits) :pointer) ((grid:foreign-pointer upper-limits) :pointer)
((dim0 lower-limits) sizet) (number-of-samples sizet)
((mpointer generator) :pointer)
((mpointer state) :pointer)
......@@ -112,7 +112,7 @@
(scalars t))
"gsl_monte_miser_integrate"
((callback :pointer)
((foreign-pointer lower-limits) :pointer) ((foreign-pointer upper-limits) :pointer)
((grid:foreign-pointer lower-limits) :pointer) ((grid:foreign-pointer upper-limits) :pointer)
((dim0 lower-limits) sizet) (number-of-samples sizet)
((mpointer generator) :pointer)
((mpointer state) :pointer)
......@@ -173,7 +173,7 @@
(scalars t))
"gsl_monte_vegas_integrate"
((callback :pointer)
((foreign-pointer lower-limits) :pointer) ((foreign-pointer upper-limits) :pointer)
((grid:foreign-pointer lower-limits) :pointer) ((grid:foreign-pointer upper-limits) :pointer)
((dim0 lower-limits) sizet) (number-of-samples sizet)
((mpointer generator) :pointer)
((mpointer state) :pointer)
......
;; Numerical integration
;; Liam Healy, Wed Jul 5 2006 - 23:14
;; Time-stamp: <2010-08-07 21:46:21EDT numerical-integration.lisp>
;; Time-stamp: <2011-01-10 17:59:21EST numerical-integration.lisp>
;;
;; Copyright 2006, 2007, 2008, 2009, 2010 Liam M. Healy
;; Copyright 2006, 2007, 2008, 2009, 2010, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -157,7 +157,7 @@
(limit 1000) (workspace (make-integration-workspace limit)))
"gsl_integration_qagp"
((callback :pointer)
((foreign-pointer points) :pointer) ((dim0 points) sizet)
((grid:foreign-pointer points) :pointer) ((dim0 points) sizet)
(absolute-error :double) (relative-error :double) (limit sizet)
((mpointer workspace) :pointer)
(result (:pointer :double)) (abserr (:pointer :double)))
......
;; Combinations
;; Liam Healy, Sun Mar 26 2006 - 11:51
;; Time-stamp: <2010-07-16 17:14:03EDT combination.lisp>
;; Time-stamp: <2011-01-10 17:59:21EST combination.lisp>
;;
;; Copyright 2006, 2007, 2008, 2009, 2010 Liam M. Healy
;; Copyright 2006, 2007, 2008, 2009, 2010, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -37,7 +37,7 @@
(setf (grid:metadata-slot object 'mpointer)
mptr
(cffi:foreign-slot-value mptr 'gsl-combination-c 'data)
(foreign-pointer object)
(grid:foreign-pointer object)
(cffi:foreign-slot-value mptr 'gsl-combination-c 'range)
range
(cffi:foreign-slot-value mptr 'gsl-combination-c 'size)
......
;; A grid:foreign-array with added metadata for GSL.
;; Liam Healy 2008-04-06 21:23:41EDT
;; Time-stamp: <2010-07-13 22:53:02EDT foreign-array.lisp>
;; Time-stamp: <2011-01-10 17:54:07EST foreign-array.lisp>
;;
;; Copyright 2008, 2009, 2010 Liam M. Healy
;; Copyright 2008, 2009, 2010, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -44,7 +44,7 @@
(setf (cffi:foreign-slot-value blockptr 'gsl-block-c 'size)
(size object)
(cffi:foreign-slot-value blockptr 'gsl-block-c 'data)
(foreign-pointer object)
(grid:foreign-pointer object)
(grid:metadata-slot object 'block-pointer) blockptr)
(let ((array-struct (alloc-from-block object blockptr)))
(setf
......@@ -54,7 +54,7 @@
(cffi:foreign-slot-value
array-struct
(if (typep object 'matrix) 'gsl-matrix-c 'gsl-vector-c) 'data)
(foreign-pointer object))
(grid:foreign-pointer object))
(tg:finalize object
(lambda ()
(cffi:foreign-free blockptr)
......@@ -92,13 +92,13 @@
(grid:make-grid
(case category
(vector
`((foreign-array ,(cffi:foreign-slot-value mpointer cstruct 'size))
,element-type))
`((foreign-array ,(cffi:foreign-slot-value mpointer cstruct 'size))
,element-type))
(matrix
`((foreign-array
,(cffi:foreign-slot-value mpointer cstruct 'size0)
,(cffi:foreign-slot-value mpointer cstruct 'size1))
,element-type)))
`((foreign-array
,(cffi:foreign-slot-value mpointer cstruct 'size0)
,(cffi:foreign-slot-value mpointer cstruct 'size1))
,element-type)))
:foreign-pointer
(cffi:foreign-slot-value mpointer cstruct 'data)
:finalizer finalize)))
......
;; Permutations
;; Liam Healy, Sun Mar 26 2006 - 11:51
;; Time-stamp: <2010-11-13 18:44:09EST permutation.lisp>
;; Time-stamp: <2011-01-10 17:59:22EST permutation.lisp>
;;
;; Copyright 2006, 2007, 2008, 2009, 2010 Liam M. Healy
;; Copyright 2006, 2007, 2008, 2009, 2010, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -38,7 +38,7 @@
(setf (grid:metadata-slot object 'mpointer)
mptr
(cffi:foreign-slot-value mptr 'gsl-permutation-c 'data)
(foreign-pointer object)
(grid:foreign-pointer object)
(cffi:foreign-slot-value mptr 'gsl-permutation-c 'size)
(first dimensions))
(tg:finalize object (lambda () (cffi:foreign-free mptr)))))
......
;; Backward FFT
;; Sumant Oemrawsingh, Sat Oct 24 2009 - 12:55
;; Time-stamp: <2010-06-27 18:13:59EDT backward.lisp>
;; Time-stamp: <2011-01-10 17:59:22EST backward.lisp>
;;
;; Copyright 2009 Sumant Oemrawsingh, Liam M. Healy
;; Copyright 2009, 2011 Sumant Oemrawsingh, Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -33,7 +33,7 @@
(defmfun backward-fourier-transform-radix2
((vector vector) &key (stride 1))
("gsl_fft" :type "_radix2_backward")
(((foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet))
(((grid:foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet))
:definition :generic
:element-types :complex
:inputs (vector)
......@@ -49,7 +49,7 @@
(wavetable (make-fft-wavetable element-type (floor (size vector) stride)))
(workspace (make-fft-workspace element-type (floor (size vector) stride))))
("gsl_fft" :type "_backward")
(((foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet)
(((grid:foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet)
((mpointer wavetable) :pointer) ((mpointer workspace) :pointer))
:definition :generic
:element-types :complex
......@@ -69,7 +69,7 @@
(defmfun backward-fourier-transform-halfcomplex-radix2
((vector vector) &key (stride 1))
("gsl_fft_halfcomplex" :type "_radix2_backward")
(((foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet))
(((grid:foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet))
:definition :generic
:element-types :float
:inputs (vector)
......@@ -86,7 +86,7 @@
(wavetable (make-fft-wavetable element-type (floor (size vector) stride) t))
(workspace (make-fft-workspace element-type (floor (size vector) stride))))
("gsl_fft_halfcomplex" :type "_backward")
(((foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet)
(((grid:foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet)
((mpointer wavetable) :pointer) ((mpointer workspace) :pointer))
:definition :generic
:element-types :float
......@@ -106,7 +106,7 @@
(defmfun backward-fourier-transform-dif-radix2
((vector vector) &key (stride 1))
("gsl_fft" :type "_radix2_dif_backward")
(((foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet))
(((grid:foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet))
:definition :generic
:element-types :complex
:inputs (vector)
......
;; Discrete Fourier Transforms
;; Liam Healy 2009-11-07 14:24:07EST
;; Time-stamp: <2010-06-29 22:15:25EDT discrete.lisp>
;; Time-stamp: <2011-01-10 17:59:23EST discrete.lisp>
;;
;; Copyright 2009 Liam M. Healy
;; Copyright 2009, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -31,8 +31,8 @@
&key (stride 1)
(result (grid:make-foreign-array element-type :dimensions (dimensions vector))))
("gsl_dft" :type "_forward")
(((foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet)
((foreign-pointer result) :pointer))
(((grid:foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet)
((grid:foreign-pointer result) :pointer))
:definition :generic
:element-types :complex
:inputs (vector)
......@@ -47,8 +47,8 @@
&key (stride 1)
(result (grid:make-foreign-array element-type :dimensions (dimensions vector))))
("gsl_dft" :type "_backward")
(((foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet)
((foreign-pointer result) :pointer))
(((grid:foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet)
((grid:foreign-pointer result) :pointer))
:definition :generic
:element-types :complex
:inputs (vector)
......@@ -63,8 +63,8 @@
&key (stride 1)
(result (grid:make-foreign-array element-type :dimensions (dimensions vector))))
("gsl_dft" :type "_inverse")
(((foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet)
((foreign-pointer result) :pointer))
(((grid:foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet)
((grid:foreign-pointer result) :pointer))
:definition :generic
:element-types :complex
:inputs (vector)
......@@ -79,8 +79,8 @@
&key (stride 1)
(result (grid:make-foreign-array element-type :dimensions (dimensions vector))))
("gsl_dft" :type "_transform")
(((foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet)
((foreign-pointer result) :pointer))
(((grid:foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet)
((grid:foreign-pointer result) :pointer))
:definition :generic
:element-types :complex
:inputs (vector)
......
;; Forward FFT.
;; Sumant Oemrawsingh, Sat Oct 31 2009 - 23:48
;; Time-stamp: <2010-06-27 18:13:58EDT forward.lisp>
;; Time-stamp: <2011-01-10 17:59:23EST forward.lisp>
;;
;; Copyright 2009 Sumant Oemrawsingh, Liam M. Healy
;; Copyright 2009, 2011 Sumant Oemrawsingh, Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -37,7 +37,7 @@
single-float "gsl_fft_real_float_radix2_transform"
complex-double-float "gsl_fft_complex_radix2_forward"
complex-single-float "gsl_fft_complex_float_radix2_forward")
(((foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet))
(((grid:foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet))
:definition :generic
:element-types :float-complex
:inputs (vector)
......@@ -56,7 +56,7 @@
single-float "gsl_fft_real_float_transform"
complex-double-float "gsl_fft_complex_forward"
complex-single-float "gsl_fft_complex_float_forward")
(((foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet)
(((grid:foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet)
((mpointer wavetable) :pointer) ((mpointer workspace) :pointer))
:definition :generic
:element-types :float-complex
......@@ -75,7 +75,7 @@
(defmfun forward-fourier-transform-halfcomplex-radix2
((vector vector) &key (stride 1))
("gsl_fft_halfcomplex" :type "_radix2_transform")
(((foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet))
(((grid:foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet))
:definition :generic
:element-types :float
:inputs (vector)
......@@ -92,7 +92,7 @@
(wavetable (make-fft-wavetable element-type (floor (size vector) stride) t))
(workspace (make-fft-workspace element-type (floor (size vector) stride))))
("gsl_fft_halfcomplex" :type "_transform")
(((foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet)
(((grid:foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet)
((mpointer wavetable) :pointer) ((mpointer workspace) :pointer))
:definition :generic
:element-types :float
......@@ -111,7 +111,7 @@
(defmfun forward-fourier-transform-dif-radix2 ((vector vector) &key (stride 1))
("gsl_fft" :type "_radix2_dif_forward")
(((foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet))
(((grid:foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet))
:definition :generic
:element-types :complex
:inputs (vector)
......
;; Inverse FFT
;; Sumant Oemrawsingh, Sat Oct 24 2009 - 12:55
;; Time-stamp: <2010-06-27 18:14:00EDT inverse.lisp>
;; Time-stamp: <2011-01-10 17:59:24EST inverse.lisp>
;;
;; Copyright 2009 Sumant Oemrawsingh, Liam M. Healy
;; Copyright 2009, 2011 Sumant Oemrawsingh, Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -33,7 +33,7 @@
(defmfun inverse-fourier-transform-radix2
((vector vector) &key (stride 1))
("gsl_fft" :type "_radix2_inverse")
(((foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet))
(((grid:foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet))
:definition :generic
:element-types :complex
:inputs (vector)
......@@ -49,7 +49,7 @@
(wavetable (make-fft-wavetable element-type (floor (size vector) stride)))
(workspace (make-fft-workspace element-type (floor (size vector) stride))))
("gsl_fft" :type "_inverse")
(((foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet)
(((grid:foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet)
((mpointer wavetable) :pointer) ((mpointer workspace) :pointer))
:definition :generic
:element-types :complex
......@@ -69,7 +69,7 @@
(defmfun inverse-fourier-transform-halfcomplex-radix2
((vector vector) &key (stride 1))
("gsl_fft_halfcomplex" :type "_radix2_inverse")
(((foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet))
(((grid:foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet))
:definition :generic
:element-types :float
:inputs (vector)
......@@ -86,7 +86,7 @@
(wavetable (make-fft-wavetable element-type (floor (size vector) stride) t))
(workspace (make-fft-workspace element-type (floor (size vector) stride))))
("gsl_fft_halfcomplex" :type "_inverse")
(((foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet)
(((grid:foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet)
((mpointer wavetable) :pointer) ((mpointer workspace) :pointer))
:definition :generic
:element-types :float
......@@ -106,7 +106,7 @@
(defmfun inverse-fourier-transform-dif-radix2
((vector vector) &key (stride 1))
("gsl_fft" :type "_radix2_dif_inverse")
(((foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet))
(((grid:foreign-pointer vector) :pointer) (stride sizet) ((floor (size vector) stride) sizet))
:definition :generic
:element-types :complex
:inputs (vector)
......
;; FFT where direction is selected.
;; Sumant Oemrawsingh, Sat Oct 24 2009 - 12:55
;; Time-stamp: <2010-06-27 18:13:58EDT select-direction.lisp>
;; Time-stamp: <2011-01-10 17:59:24EST select-direction.lisp>
;;
;; Copyright 2009 Sumant Oemrawsingh, Liam M. Healy
;; Copyright 2009, 2011 Sumant Oemrawsingh, Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -26,7 +26,7 @@
(defmfun fourier-transform-radix2
((vector vector) direction &key (stride 1) (n (expt 2 (floor (log (size vector) 2)))))
("gsl_fft" :type "_radix2_transform")
(((foreign-pointer vector) :pointer) (stride sizet) (n sizet) (direction fft-direction))
(((grid:foreign-pointer vector) :pointer) (stride sizet) (n sizet) (direction fft-direction))
:definition :generic
:element-types :complex
:inputs (vector)
......@@ -40,7 +40,7 @@
(defmfun fourier-transform-dif-radix2
((vector vector) direction &key (stride 1) (n (expt 2 (floor (log (size vector) 2)))))
("gsl_fft" :type "_radix2_dif_transform")
(((foreign-pointer vector) :pointer) (stride sizet) (n sizet) (direction fft-direction))
(((grid:foreign-pointer vector) :pointer) (stride sizet) (n sizet) (direction fft-direction))
:definition :generic
:element-types :complex
:inputs (vector)
......
;; Unpack functions for FFT vectors.
;; Sumant Oemrawsingh, Sun Oct 25 2009 - 16:35
;; Time-stamp: <2010-06-29 22:12:06EDT unpack.lisp>
;; Time-stamp: <2011-01-10 17:59:24EST unpack.lisp>
;;
;; Copyright 2009 Sumant Oemrawsingh, Liam M. Healy
;; Copyright 2009, 2011 Sumant Oemrawsingh, Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -34,8 +34,8 @@
t
(grid:make-foreign-array '(complex double-float) :dimensions (size vector)))))
("gsl_fft_real" :type "_unpack")
(((foreign-pointer vector) :pointer)
((foreign-pointer output) :pointer)
(((grid:foreign-pointer vector) :pointer)
((grid:foreign-pointer output) :pointer)
(stride sizet) ((floor (size vector) stride) sizet))
:definition :generic
:element-types :float
......@@ -58,8 +58,8 @@
t
(grid:make-foreign-array '(complex double-float) :dimensions (size vector)))))
("gsl_fft_halfcomplex" :type "_radix2_unpack")
(((foreign-pointer vector) :pointer)
((foreign-pointer output) :pointer)
(((grid:foreign-pointer vector) :pointer)
((grid:foreign-pointer output) :pointer)
(stride sizet) ((floor (size vector) stride) sizet))
:definition :generic
:element-types :float
......@@ -81,8 +81,8 @@
t
(grid:make-foreign-array '(complex double-float) :dimensions (size vector)))))
("gsl_fft_halfcomplex" :type "_unpack")
(((foreign-pointer vector) :pointer)
((foreign-pointer output) :pointer)
(((grid:foreign-pointer vector) :pointer)
((grid:foreign-pointer output) :pointer)
(stride sizet) ((floor (size vector) stride) sizet))
:definition :generic
:element-types :float
......
;; Discrete Hankel Transforms.
;; Liam Healy, Sat Dec 8 2007 - 16:50
;; Time-stamp: <2010-07-07 14:19:28EDT hankel.lisp>
;; Time-stamp: <2011-01-10 17:59:25EST hankel.lisp>
;;
;; Copyright 2007, 2008, 2009 Liam M. Healy
;; Copyright 2007, 2008, 2009, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -41,8 +41,8 @@
&optional
(array-out (grid:make-foreign-array 'double-float :dimensions (dimensions array-in))))
"gsl_dht_apply"
(((mpointer hankel) :pointer) ((foreign-pointer array-in) :pointer)
((foreign-pointer array-out) :pointer))
(((mpointer hankel) :pointer) ((grid:foreign-pointer array-in) :pointer)
((grid:foreign-pointer array-out) :pointer))
:inputs (array-in)
:outputs (array-out)
:return (array-out)
......
;; The histogram structure
;; Liam Healy, Mon Jan 1 2007 - 11:32
;; Time-stamp: <2010-11-13 19:24:22EST histogram.lisp>
;; Time-stamp: <2011-01-10 17:59:25EST histogram.lisp>
;;
;; Copyright 2007, 2008, 2009, 2010 Liam M. Healy
;; Copyright 2007, 2008, 2009, 2010, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -30,7 +30,7 @@
((number-of-bins sizet))
"one-dimensional histogram, including bin boundaries and bin contents"
:initialize-suffix "set_ranges"
:initialize-args (((foreign-pointer ranges) :pointer) ((dim0 ranges) sizet)))
:initialize-args (((grid:foreign-pointer ranges) :pointer) ((dim0 ranges) sizet)))
(defmobject histogram2d
"gsl_histogram2d"
......@@ -38,8 +38,8 @@
"two-dimensional histogram, including bin boundaries and bin contents."
:initialize-suffix "set_ranges"
:initialize-args
(((foreign-pointer x-ranges) :pointer) ((dim0 x-ranges) sizet)
((foreign-pointer y-ranges) :pointer) ((dim0 y-ranges) sizet)))
(((grid:foreign-pointer x-ranges) :pointer) ((dim0 x-ranges) sizet)
((grid:foreign-pointer y-ranges) :pointer) ((dim0 y-ranges) sizet)))
;;; GSL documentation does not state what the return value for the
;;; C function for reinitialization means; assumed to be error code.
......
;; Load GSL
;; Liam Healy Sat Mar 4 2006 - 18:53
;; Time-stamp: <2011-01-01 16:14:55EST init.lisp>
;; Time-stamp: <2011-01-10 17:47:50EST init.lisp>
;;
;; Copyright 2006, 2007, 2008, 2009, 2010, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -26,7 +26,7 @@
#:cl-array #:dimensions #:element-type
#:foreign-array #:matrix #:dim0 #:dim1 #:^
#:copy)
(:shadowing-import-from :grid #:foreign-pointer)
;;(:shadowing-import-from :grid #:foreign-pointer)
(:export
#:cl-array #:dimensions #:element-type #:dim0 #:dim1
#:copy))
......
;; Evaluation of interpolation functions.
;; Liam Healy Sun Nov 4 2007 - 18:40
;; Time-stamp: <2010-06-27 18:13:56EDT evaluation.lisp>
;; Time-stamp: <2011-01-10 17:59:26EST evaluation.lisp>
;;
;; Copyright 2007, 2008, 2009 Liam M. Healy
;; Copyright 2007, 2008, 2009, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -27,8 +27,8 @@
&key xa ya (acceleration (make-acceleration)))
"gsl_interp_eval"
(((mpointer interpolation) :pointer)
((foreign-pointer xa) :pointer)
((foreign-pointer ya) :pointer)
((grid:foreign-pointer xa) :pointer)
((grid:foreign-pointer ya) :pointer)
(x :double)
((mpointer acceleration) :pointer))
:definition :method
......@@ -51,8 +51,8 @@
&key xa ya (acceleration (make-acceleration)))
"gsl_interp_eval_deriv"
(((mpointer interpolation) :pointer)
((foreign-pointer xa) :pointer)
((foreign-pointer ya) :pointer)
((grid:foreign-pointer xa) :pointer)
((grid:foreign-pointer ya) :pointer)
(x :double)
((mpointer acceleration) :pointer))
:definition :method
......@@ -70,8 +70,8 @@
((interpolation interpolation) x &key xa ya (acceleration (make-acceleration)))
"gsl_interp_eval_deriv2"
(((mpointer interpolation) :pointer)
((foreign-pointer xa) :pointer)
((foreign-pointer ya) :pointer)
((grid:foreign-pointer xa) :pointer)
((grid:foreign-pointer ya) :pointer)
(x :double)
((mpointer acceleration) :pointer))
:definition :method
......@@ -90,8 +90,8 @@
&key xa ya (acceleration (make-acceleration)))
"gsl_interp_eval_integ"
(((mpointer interpolation) :pointer)
((foreign-pointer xa) :pointer)
((foreign-pointer ya) :pointer)
((grid:foreign-pointer xa) :pointer)
((grid:foreign-pointer ya) :pointer)
(low :double) (high :double) ((mpointer acceleration) :pointer))
:definition :method
:inputs (xa ya)
......
;; Interpolation allocation, initialization, and freeing.
;; Liam Healy, Sun Nov 4 2007 - 17:24
;; Time-stamp: <2010-06-27 18:13:56EDT interpolation.lisp>
;; Time-stamp: <2011-01-10 17:59:26EST interpolation.lisp>
;;
;; Copyright 2007, 2008, 2009 Liam M. Healy
;; Copyright 2007, 2008, 2009, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -37,7 +37,7 @@
strictly ordered; the behavior for other arrangements is not defined."
:initialize-suffix "init"
:initialize-args
(((foreign-pointer xa) :pointer) ((foreign-pointer ya) :pointer) ((dim0 xa) sizet))
(((grid:foreign-pointer xa) :pointer) ((grid:foreign-pointer ya) :pointer) ((dim0 xa) sizet))
:arglists-function
(lambda (set)
`((type &optional xa-or-size (ya nil ,set))
......@@ -51,7 +51,7 @@
"Make an interpolation object of type for size data-points."
:initialize-suffix "init"
:initialize-args
(((foreign-pointer xa) :pointer) ((foreign-pointer ya) :pointer) ((dim0 xa) sizet))
(((grid:foreign-pointer xa) :pointer) ((grid:foreign-pointer ya) :pointer) ((dim0 xa) sizet))
:inputs (xa ya)
:arglists-function
(lambda (set)
......
;; BLAS level 1, Vector operations
;; Liam Healy, Wed Apr 26 2006 - 15:23
;; Time-stamp: <2010-07-07 14:25:01EDT blas1.lisp>
;; Time-stamp: <2011-01-10 17:59:27EST blas1.lisp>
;;
;; Copyright 2006, 2007, 2008, 2009 Liam M. Healy
;; Copyright 2006, 2007, 2008, 2009, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -153,8 +153,8 @@
(defmfun givens-rotation ((x vector) (y vector) (c vector) (s vector))
("gsl_blas_" :type "rotg")
(((foreign-pointer x) :pointer) ((foreign-pointer y) :pointer)
((foreign-pointer c) :pointer) ((foreign-pointer s) :pointer))
(((grid:foreign-pointer x) :pointer) ((grid:foreign-pointer y) :pointer)
((grid:foreign-pointer c) :pointer) ((grid:foreign-pointer s) :pointer))
:definition :generic
:element-types :float
:inputs (x y c s)
......@@ -182,9 +182,9 @@
(defmfun modified-givens-rotation
((d1 vector) (d2 vector) (b1 vector) b2 (P vector))
("gsl_blas_" :type "rotmg")
(((foreign-pointer d1) :pointer) ((foreign-pointer d2) :pointer)
((foreign-pointer b1) :pointer) (b2 :element-c-type)
((foreign-pointer P) :pointer))
(((grid:foreign-pointer d1) :pointer) ((grid:foreign-pointer d2) :pointer)
((grid:foreign-pointer b1) :pointer) (b2 :element-c-type)
((grid:foreign-pointer P) :pointer))
:definition :generic
:element-types :float
:inputs (d1 d2 b1 P)
......
;; Evolution functions for ODE integration.
;; Liam Healy, Sun Sep 30 2007 - 14:31
;; Time-stamp: <2010-06-27 18:13:51EDT evolution.lisp>
;; Time-stamp: <2011-01-10 17:59:27EST evolution.lisp>
;;
;; Copyright 2007, 2008, 2009 Liam M. Healy
;; Copyright 2007, 2008, 2009, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -32,9 +32,9 @@
"gsl_odeiv_evolve_apply"
(((mpointer evolution) :pointer) ((mpointer control) :pointer)
((mpointer stepper) :pointer)
((callback-struct stepper) :pointer) ((foreign-pointer time) :pointer)
((callback-struct stepper) :pointer) ((grid:foreign-pointer time) :pointer)
(max-time :double)
((foreign-pointer step-size) :pointer) ((foreign-pointer y) :pointer))
((grid:foreign-pointer step-size) :pointer) ((grid:foreign-pointer y) :pointer))
:inputs (time step-size y)
:outputs (time step-size y)
:callback-object ((stepper ode-stepper))
......
;; Stepping functions for ODE systems.
;; Liam Healy, Mon Sep 24 2007 - 21:33
;; Time-stamp: <2010-06-27 18:13:51EDT stepping.lisp>
;; Time-stamp: <2011-01-10 17:59:27EST stepping.lisp>
;;
;; Copyright 2007, 2008, 2009 Liam M. Healy
;; Copyright 2007, 2008, 2009, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -106,10 +106,10 @@ values):
(((mpointer stepper) :pointer)
(time :double)
(step-size :double)
((foreign-pointer y) :pointer)
((foreign-pointer yerr) :pointer)
((foreign-pointer dydt-in) :pointer)
((foreign-pointer dydt-out) :pointer)
((grid:foreign-pointer y) :pointer)
((grid:foreign-pointer yerr) :pointer)
((grid:foreign-pointer dydt-in) :pointer)
((grid:foreign-pointer dydt-out) :pointer)
((callback-struct stepper) :pointer))
:documentation ; FDL
"Apply the stepping function stepper to the system of equations
......
;; Polynomials
;; Liam Healy, Tue Mar 21 2006 - 18:33
;; Time-stamp: <2011-01-10 10:29:48EST polynomial.lisp>
;; Time-stamp: <2011-01-10 17:47:56EST polynomial.lisp>
;;
;; Copyright 2009, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -29,10 +29,10 @@
(defmfun evaluate
((coefficients grid:vector-double-float) (x float) &key divided-difference)
("gsl_poly_eval" "gsl_poly_dd_eval")
((((foreign-pointer coefficients) :pointer) ((dim0 coefficients) sizet)
((((grid:foreign-pointer coefficients) :pointer) ((dim0 coefficients) sizet)
(x :double))
(((foreign-pointer divided-difference) :pointer)
((foreign-pointer coefficients) :pointer)
(((grid:foreign-pointer divided-difference) :pointer)
((grid:foreign-pointer coefficients) :pointer)
((dim0 coefficients) sizet)
(x :double)))
:definition :method
......@@ -46,7 +46,7 @@
((coefficients grid:vector-double-float) (x complex)
&key)
"gsl_poly_complex_eval"
(((foreign-pointer coefficients) :pointer) ((dim0 coefficients) sizet)
(((grid:foreign-pointer coefficients) :pointer) ((dim0 coefficients) sizet)
(x grid:complex-double-c))
:definition :method
:gsl-version (1 11)
......@@ -60,7 +60,7 @@
((coefficients grid:vector-complex-double-float) (x complex)
&key)
"gsl_complex_poly_complex_eval"
(((foreign-pointer coefficients) :pointer) ((dim0 coefficients) sizet)
(((grid:foreign-pointer coefficients) :pointer) ((dim0 coefficients) sizet)
(x grid:complex-double-c))
:definition :method
:gsl-version (1 11)
......@@ -76,8 +76,8 @@
(defmfun divided-difference
(xa ya &optional (dd (grid:make-foreign-array 'double-float :dimensions (dim0 xa))))
"gsl_poly_dd_init"
(((foreign-pointer dd) :pointer)
((foreign-pointer xa) :pointer) ((foreign-pointer ya) :pointer)