Commit af3cb9e6 authored by Liam M. Healy's avatar Liam M. Healy
Browse files

Default wavetable/workspace; remove unused constant in GSL 1.13; fix dependency

In FFT, the default wavetable and workspace arguments to functions now
all use #'make-fft-wavetable and make-fft-workspace.  Removed
definition of +cgsm-gauss+ because evidently GSL_CONST_CGSM_GAUSS is
no longer in GSL as of 1.13.  Added dependency on init for
physical-consants.  Trivial change to names of systems in asd files to
be more standard.
parent e2771a1b
......@@ -48,7 +48,7 @@ even for someone not intending to program in Lisp.
<p>Topics include: polynomials, special functions, vectors and
matrices, permutations, sorting, linear algebra including BLAS,
eigensystems, fast Fourier transforms, quadrature, random numbers,
eigensystems, fast Fourier transforms (FFT), quadrature, random numbers,
quasi-random sequences, random distributions, statistics, histograms,
N-tuples, Monte Carlo integration, simulated annealing, ordinary
differential equations, interpolation, numerical integration,
......@@ -177,17 +177,20 @@ Then in Lisp, load the system:
</ul>
<p>Please see <a href="status.text">status.text</a> for known failures.
<h3>With <a href="http://common-lisp.net/project/clbuild/">clbuild</a></h3>
<p>
First, make sure that the development versions of GSL and libffi are
loaded, e.g. in Debian/Ubuntu <code>libgsl0-dev</code>
and <code>libffi-dev</code>.
<p>
Add the following to <code>wnpp-projects</code>:
<ul>
<li><code>gsll get_git git://repo.or.cz/gsll.git</code></li>
<li><code>fsbv get_git git://repo.or.cz/fsbv.git</code></li>
<li><code>trivial-garbage get_darcs http://common-lisp.net/~loliveira/darcs/trivial-garbage</code></li>
<li><code>cl-utilities get_cvs_clnet</code></li>
<li><code>lisp-unit get_git git://repo.or.cz/lisp-unit.git</code></li>
</ul>
<p>and add
<ul>
<li><code>gsll cffi trivial-garbage cl-utilities</code></li>
<li><code>gsll cffi trivial-garbage cl-utilities lisp-unit fsbv iterate asdf-system-connections</code></li>
</ul>
<p>
to <code>dependencies</code> and execute
......@@ -434,7 +437,7 @@ and arrays used internally or for function return.
<!-- Created: Feb 25 2005 -->
<!-- hhmts start -->
<small>
Time-stamp: <2009-11-01 22:50:22EST index.html>
Time-stamp: <2009-11-09 15:27:51EST index.html>
</small>
<!-- hhmts end -->
</div>
......
;; Backward FFT
;; Sumant Oemrawsingh, Sat Oct 24 2009 - 12:55
;; Time-stamp: <2009-11-07 10:46:20EST backward.lisp>
;; Time-stamp: <2009-11-09 16:30:05EST backward.lisp>
(in-package :gsl)
......@@ -30,14 +30,8 @@
(defmfun backward-fourier-transform-nonradix2
((vector vector) &key (stride 1) (n (size vector))
(wavetable
(eltcase (complex single-float)
(make-fft-complex-wavetable-single-float (size vector))
(complex double-float)
(make-fft-complex-wavetable-double-float (size vector))))
(workspace
(eltcase (complex single-float) (make-fft-complex-workspace-single-float (size vector))
(complex double-float) (make-fft-complex-workspace-double-float (size vector)))))
(wavetable (make-fft-wavetable element-type (size vector)))
(workspace (make-fft-workspace element-type (size vector))))
("gsl_fft" :type "_backward")
(((c-pointer vector) :pointer) (stride sizet) (n sizet)
((mpointer wavetable) :pointer) ((mpointer workspace) :pointer))
......@@ -73,12 +67,8 @@
(defmfun backward-fourier-transform-halfcomplex-nonradix2
((vector vector) &key (stride 1) (n (size vector))
(wavetable
(eltcase single-float (make-half-complex-wavetable-single-float (size vector))
double-float (make-half-complex-wavetable-double-float (size vector))))
(workspace
(eltcase single-float (make-real-workspace-single-float (size vector))
double-float (make-real-workspace-double-float (size vector)))))
(wavetable (make-fft-wavetable element-type (size vector) t))
(workspace (make-fft-workspace element-type (size vector))))
("gsl_fft_halfcomplex" :type "_backward")
(((c-pointer vector) :pointer) (stride sizet) (n sizet)
((mpointer wavetable) :pointer) ((mpointer workspace) :pointer))
......
;; Forward FFT.
;; Sumant Oemrawsingh, Sat Oct 31 2009 - 23:48
;; Time-stamp: <2009-11-07 09:28:54EST forward.lisp>
;; Time-stamp: <2009-11-09 16:29:06EST forward.lisp>
(in-package :gsl)
......@@ -34,20 +34,8 @@
(defmfun forward-fourier-transform-nonradix2
((vector vector) &key (stride 1)
(wavetable
(eltcase single-float (make-fft-real-wavetable-single-float (size vector))
double-float (make-fft-real-wavetable-double-float (size vector))
(complex single-float)
(make-fft-complex-wavetable-single-float (size vector))
(complex double-float)
(make-fft-complex-wavetable-double-float (size vector))))
(workspace
(eltcase single-float (make-fft-real-workspace-single-float (size vector))
double-float (make-fft-real-workspace-double-float (size vector))
(complex single-float)
(make-fft-complex-workspace-single-float (size vector))
(complex double-float)
(make-fft-complex-workspace-double-float (size vector)))))
(wavetable (make-fft-wavetable element-type (size vector)))
(workspace (make-fft-workspace element-type (size vector))))
(double-float "gsl_fft_real_transform"
single-float "gsl_fft_real_float_transform"
complex-double-float "gsl_fft_complex_forward"
......@@ -85,12 +73,8 @@
(defmfun forward-fourier-transform-halfcomplex-nonradix2
((vector vector) &key (stride 1)
(wavetable
(eltcase single-float (make-fft-real-wavetable-single-float (size vector))
double-float (make-fft-real-wavetable-double-float (size vector))))
(workspace
(eltcase single-float (make-fft-real-workspace-single-float (size vector))
double-float (make-fft-real-workspace-double-float (size vector)))))
(wavetable (make-fft-wavetable element-type (size vector) t))
(workspace (make-fft-workspace element-type (size vector))))
("gsl_fft_halfcomplex" :type "_transform")
(((c-pointer vector) :pointer) (stride sizet) ((size vector) sizet)
((mpointer wavetable) :pointer) ((mpointer workspace) :pointer))
......
;; Inverse FFT
;; Sumant Oemrawsingh, Sat Oct 24 2009 - 12:55
;; Time-stamp: <2009-11-07 10:48:11EST inverse.lisp>
;; Time-stamp: <2009-11-09 16:31:22EST inverse.lisp>
(in-package :gsl)
......@@ -30,14 +30,8 @@
(defmfun inverse-fourier-transform-nonradix2
((vector vector) &key (stride 1) (n (size vector))
(wavetable
(eltcase (complex single-float)
(make-fft-complex-wavetable-single-float (size vector))
(complex double-float)
(make-fft-complex-wavetable-double-float (size vector))))
(workspace
(eltcase (complex single-float) (make-fft-complex-workspace-single-float (size vector))
(complex double-float) (make-fft-complex-workspace-double-float (size vector)))))
(wavetable (make-fft-wavetable element-type (size vector)))
(workspace (make-fft-workspace element-type (size vector))))
("gsl_fft" :type "_inverse")
(((c-pointer vector) :pointer) (stride sizet) (n sizet)
((mpointer wavetable) :pointer) ((mpointer workspace) :pointer))
......@@ -73,12 +67,8 @@
(defmfun inverse-fourier-transform-halfcomplex-nonradix2
((vector vector) &key (stride 1) (n (size vector))
(wavetable
(eltcase single-float (make-half-complex-wavetable-single-float (size vector))
double-float (make-half-complex-wavetable-double-float (size vector))))
(workspace
(eltcase single-float (make-real-workspace-single-float (size vector))
double-float (make-real-workspace-double-float (size vector)))))
(wavetable (make-fft-wavetable element-type (size vector) t))
(workspace (make-fft-workspace element-type (size vector))))
("gsl_fft_halfcomplex" :type "_inverse")
(((c-pointer vector) :pointer) (stride sizet) (n sizet)
((mpointer wavetable) :pointer) ((mpointer workspace) :pointer))
......
;; Definition of GSLL system
;; Liam Healy
;; Time-stamp: <2009-09-26 16:44:38EDT gsll-tests.asd>
;; Time-stamp: <2009-11-09 16:05:14EST gsll-tests.asd>
(asdf:defsystem "gsll-tests"
:name "gsll-tests"
(asdf:defsystem GSLL-TESTS
:name "GSLL-tests"
:description "Regression (unit) tests for GNU Scientific Library for Lisp."
:version "0"
:author "Liam M. Healy"
......
;; Definition of GSLL system
;; Liam Healy
;; Time-stamp: <2009-11-08 21:37:36EST gsll.asd>
;; Time-stamp: <2009-11-09 16:04:42EST gsll.asd>
(when (asdf:find-system :fsbv nil)
(pushnew :fsbv *features*))
......@@ -8,8 +8,8 @@
(eval-when (:compile-toplevel :load-toplevel :execute)
(asdf:oos 'asdf:load-op :cffi-grovel))
(asdf:defsystem "gsll"
:name "gsll"
(asdf:defsystem GSLL
:name "GSLL"
:description "GNU Scientific Library for Lisp."
:version "0"
:author "Liam M. Healy"
......@@ -251,6 +251,7 @@
(:file "simulated-annealing")))
(:file "basis-splines" :depends-on (init data random))
(:module physical-constants
:depends-on (init)
:components
((cffi-grovel:grovel-file "mksa")
(cffi-grovel:grovel-file "cgsm")
......
;; Physical constants in the CGSM system
;; Liam Healy 2009-05-25 17:01:32EDT cgsm.lisp
;; Time-stamp: <2009-08-23 10:24:52EDT cgsm.lisp>
;; Time-stamp: <2009-11-09 12:28:49EST cgsm.lisp>
;; $Id: $
(in-package :gsl)
......@@ -102,7 +102,7 @@
(constant (+cgsm-stokes+ GSL_CONST_CGSM_STOKES) :type double-float)
(constant (+cgsm-faraday+ GSL_CONST_CGSM_FARADAY) :type double-float)
(constant (+cgsm-electron-charge+ GSL_CONST_CGSM_ELECTRON_CHARGE) :type double-float)
(constant (+cgsm-gauss+ GSL_CONST_CGSM_GAUSS) :type double-float)
;;;(constant (+cgsm-gauss+ GSL_CONST_CGSM_GAUSS) :type double-float)
(constant (+cgsm-stilb+ GSL_CONST_CGSM_STILB) :type double-float)
(constant (+cgsm-lumen+ GSL_CONST_CGSM_LUMEN) :type double-float)
(constant (+cgsm-lux+ GSL_CONST_CGSM_LUX) :type double-float)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment