Commit 2597eaec authored by Liam M. Healy's avatar Liam M. Healy

Use grid:copy-to instead of cl-array

Do not use cl-array in tests because it isn't always available.  The
safer way is by doing a copy out to a new CL array.
parent 99257936
;; Numerical integration ;; Numerical integration
;; Liam Healy, Wed Jul 5 2006 - 23:14 ;; Liam Healy, Wed Jul 5 2006 - 23:14
;; Time-stamp: <2010-07-06 23:26:39EDT numerical-integration.lisp> ;; Time-stamp: <2010-07-07 14:21:55EDT numerical-integration.lisp>
;; ;;
;; Copyright 2006, 2007, 2008, 2009 Liam M. Healy ;; Copyright 2006, 2007, 2008, 2009 Liam M. Healy
;; Distributed under the terms of the GNU General Public License ;; Distributed under the terms of the GNU General Public License
...@@ -367,6 +367,6 @@ ...@@ -367,6 +367,6 @@
(integration-QAGil (integration-test-myfn2 1.0d0) 1.0d0 1.0d-7 0.0d0 1000) (integration-QAGil (integration-test-myfn2 1.0d0) 1.0d0 1.0d-7 0.0d0 1000)
(integration-QAGp (integration-QAGp
'integration-test-f454 'integration-test-f454
(copy (vector 0.0d0 1.0d0 (sqrt 2.0d0) 3.0d0) :grid-type 'foreign-array) (grid:copy-to (vector 0.0d0 1.0d0 (sqrt 2.0d0) 3.0d0))
0.0d0 1.0d-3 1000) 0.0d0 1.0d-3 1000)
(integration-QAWc 'integration-test-f459 -1.0d0 5.0d0 0.0d0 0.0d0 1.0d-3 1000)) (integration-QAWc 'integration-test-f459 -1.0d0 5.0d0 0.0d0 0.0d0 1.0d-3 1000))
;; Tests of array functions ;; Tests of array functions
;; Liam Healy 2008-10-20 22:41:48EDT array-tests.lisp ;; Liam Healy 2008-10-20 22:41:48EDT array-tests.lisp
;; Time-stamp: <2010-07-06 23:51:52EDT array-tests.lisp> ;; Time-stamp: <2010-07-07 14:25:02EDT array-tests.lisp>
;; ;;
;; Copyright 2008, 2009 Liam M. Healy ;; Copyright 2008, 2009 Liam M. Healy
;; Distributed under the terms of the GNU General Public License ;; Distributed under the terms of the GNU General Public License
...@@ -32,33 +32,33 @@ ...@@ -32,33 +32,33 @@
(generate-all-array-tests vector-set-all #+fsbv t #-fsbv :no-complex (generate-all-array-tests vector-set-all #+fsbv t #-fsbv :no-complex
(let ((v1 (array-default 3 t))) (let ((v1 (array-default 3 t)))
(cl-array (set-all v1 (scalar-default))))) (grid:copy-to (set-all v1 (scalar-default)))))
(generate-all-array-tests matrix-set-all #+fsbv t #-fsbv :no-complex (generate-all-array-tests matrix-set-all #+fsbv t #-fsbv :no-complex
(let ((m1 (array-default '(3 3) t))) (let ((m1 (array-default '(3 3) t)))
(cl-array (set-all m1 (scalar-default))))) (grid:copy-to (set-all m1 (scalar-default)))))
(generate-all-array-tests vector-set-zero t (generate-all-array-tests vector-set-zero t
(let ((v1 (array-default 3))) (let ((v1 (array-default 3)))
(set-zero v1) (set-zero v1)
(cl-array v1))) (grid:copy-to v1)))
(generate-all-array-tests matrix-set-zero t (generate-all-array-tests matrix-set-zero t
(let ((m1 (array-default '(3 3)))) (let ((m1 (array-default '(3 3))))
(set-zero m1) (set-zero m1)
(cl-array m1))) (grid:copy-to m1)))
(generate-all-array-tests vector-swap t (generate-all-array-tests vector-swap t
(let ((v1 (array-default 3)) (let ((v1 (array-default 3))
(v2 (array-default 3))) (v2 (array-default 3)))
(swap v2 v1) (swap v2 v1)
(list (cl-array v1) (cl-array v2)))) (list (grid:copy-to v1) (grid:copy-to v2))))
(generate-all-array-tests matrix-swap t (generate-all-array-tests matrix-swap t
(let ((m1 (array-default '(3 3))) (let ((m1 (array-default '(3 3)))
(m2 (array-default '(3 3)))) (m2 (array-default '(3 3))))
(swap m2 m1) (swap m2 m1)
(list (cl-array m1) (cl-array m2)))) (list (grid:copy-to m1) (grid:copy-to m2))))
;;;;**************************************************************************** ;;;;****************************************************************************
;;;; Arithmetic operations ;;;; Arithmetic operations
...@@ -74,53 +74,53 @@ ...@@ -74,53 +74,53 @@
(generate-all-array-tests matrix-add :no-complex (generate-all-array-tests matrix-add :no-complex
(let ((m1 (array-default '(3 3))) (let ((m1 (array-default '(3 3)))
(m2 (array-default '(3 3)))) (m2 (array-default '(3 3))))
(cl-array (elt+ m1 m2)))) (grid:copy-to (elt+ m1 m2))))
(generate-all-array-tests vector-sub :no-complex (generate-all-array-tests vector-sub :no-complex
(let ((v1 (array-default 3)) (let ((v1 (array-default 3))
(v2 (array-default 3))) (v2 (array-default 3)))
(cl-array (elt- v1 v2)))) (grid:copy-to (elt- v1 v2))))
(generate-all-array-tests matrix-sub :no-complex (generate-all-array-tests matrix-sub :no-complex
(let ((m1 (array-default '(3 3))) (let ((m1 (array-default '(3 3)))
(m2 (array-default '(3 3)))) (m2 (array-default '(3 3))))
(cl-array (elt- m1 m2)))) (grid:copy-to (elt- m1 m2))))
(generate-all-array-tests vector-mult :no-complex (generate-all-array-tests vector-mult :no-complex
(let ((v1 (array-default 3)) (let ((v1 (array-default 3))
(v2 (array-default 3))) (v2 (array-default 3)))
(cl-array (elt* v1 v2)))) (grid:copy-to (elt* v1 v2))))
(generate-all-array-tests matrix-mult :no-complex (generate-all-array-tests matrix-mult :no-complex
(let ((m1 (array-default '(3 3))) (let ((m1 (array-default '(3 3)))
(m2 (array-default '(3 3)))) (m2 (array-default '(3 3))))
(cl-array (elt* m1 m2)))) (grid:copy-to (elt* m1 m2))))
(generate-all-array-tests vector-div :no-complex (generate-all-array-tests vector-div :no-complex
(let ((v1 (array-default 3)) (let ((v1 (array-default 3))
(v2 (array-default 3))) (v2 (array-default 3)))
(cl-array (elt/ v1 v2)))) (grid:copy-to (elt/ v1 v2))))
(generate-all-array-tests matrix-div :no-complex (generate-all-array-tests matrix-div :no-complex
(let ((m1 (array-default '(3 3))) (let ((m1 (array-default '(3 3)))
(m2 (array-default '(3 3)))) (m2 (array-default '(3 3))))
(cl-array (elt/ m1 m2)))) (grid:copy-to (elt/ m1 m2))))
(generate-all-array-tests vector-mult-scalar :no-complex (generate-all-array-tests vector-mult-scalar :no-complex
(let ((v1 (array-default 3))) (let ((v1 (array-default 3)))
(cl-array (elt* v1 1.39d0)))) (grid:copy-to (elt* v1 1.39d0))))
(generate-all-array-tests matrix-mult-scalar :no-complex (generate-all-array-tests matrix-mult-scalar :no-complex
(let ((m1 (array-default '(3 3)))) (let ((m1 (array-default '(3 3))))
(cl-array (elt* m1 1.39d0)))) (grid:copy-to (elt* m1 1.39d0))))
(generate-all-array-tests vector-add-scalar :no-complex (generate-all-array-tests vector-add-scalar :no-complex
(let ((v1 (array-default 3))) (let ((v1 (array-default 3)))
(cl-array (elt+ v1 18.19d0)))) (grid:copy-to (elt+ v1 18.19d0))))
(generate-all-array-tests matrix-add-scalar :no-complex (generate-all-array-tests matrix-add-scalar :no-complex
(let ((m1 (array-default '(3 3)))) (let ((m1 (array-default '(3 3))))
(cl-array (elt+ m1 18.19d0)))) (grid:copy-to (elt+ m1 18.19d0))))
;;;;**************************************************************************** ;;;;****************************************************************************
;;;; Maximum and minimum elements ;;;; Maximum and minimum elements
...@@ -183,16 +183,16 @@ ...@@ -183,16 +183,16 @@
(generate-all-array-tests set-basis t (generate-all-array-tests set-basis t
(let ((v1 (array-default 8))) (let ((v1 (array-default 8)))
(set-basis v1 2) (set-basis v1 2)
(cl-array v1))) (grid:copy-to v1)))
(generate-all-array-tests swap-elements t (generate-all-array-tests swap-elements t
(let ((v1 (array-default 8))) (let ((v1 (array-default 8)))
(swap-elements v1 2 5) (swap-elements v1 2 5)
(cl-array v1))) (grid:copy-to v1)))
(generate-all-array-tests vector-reverse t (generate-all-array-tests vector-reverse t
(let ((v1 (array-default 8))) (let ((v1 (array-default 8)))
(cl-array (vector-reverse v1)))) (grid:copy-to (vector-reverse v1))))
;;;;**************************************************************************** ;;;;****************************************************************************
;;;; Matrix-only function definitions ;;;; Matrix-only function definitions
...@@ -200,47 +200,47 @@ ...@@ -200,47 +200,47 @@
(generate-all-array-tests set-identity t (generate-all-array-tests set-identity t
(let ((m1 (array-default '(3 3)))) (let ((m1 (array-default '(3 3))))
(cl-array (set-identity m1)))) (grid:copy-to (set-identity m1))))
(generate-all-array-tests row t (generate-all-array-tests row t
(let ((m1 (array-default '(3 3))) (let ((m1 (array-default '(3 3)))
(row (array-default 3 t))) (row (array-default 3 t)))
(cl-array (row m1 1 row)))) (grid:copy-to (row m1 1 row))))
(generate-all-array-tests setf-row t (generate-all-array-tests setf-row t
(let ((m1 (array-default '(3 3))) (let ((m1 (array-default '(3 3)))
(row (array-default 3))) (row (array-default 3)))
(setf (row m1 2) row) (setf (row m1 2) row)
(cl-array m1))) (grid:copy-to m1)))
(generate-all-array-tests column t (generate-all-array-tests column t
(let ((m1 (array-default '(3 3))) (let ((m1 (array-default '(3 3)))
(col (array-default 3 t))) (col (array-default 3 t)))
(cl-array (column m1 1 col)))) (grid:copy-to (column m1 1 col))))
(generate-all-array-tests setf-column t (generate-all-array-tests setf-column t
(let ((m1 (array-default '(3 3))) (let ((m1 (array-default '(3 3)))
(col (array-default 3))) (col (array-default 3)))
(setf (column m1 2) col) (setf (column m1 2) col)
(cl-array m1))) (grid:copy-to m1)))
(generate-all-array-tests swap-rows t (generate-all-array-tests swap-rows t
(let ((m1 (array-default '(3 3)))) (let ((m1 (array-default '(3 3))))
(cl-array (swap-rows m1 0 1)))) (grid:copy-to (swap-rows m1 0 1))))
(generate-all-array-tests swap-columns t (generate-all-array-tests swap-columns t
(let ((m1 (array-default '(3 3)))) (let ((m1 (array-default '(3 3))))
(cl-array (swap-columns m1 1 2)))) (grid:copy-to (swap-columns m1 1 2))))
(generate-all-array-tests swap-row-column t (generate-all-array-tests swap-row-column t
(let ((m1 (array-default '(3 3)))) (let ((m1 (array-default '(3 3))))
(cl-array (swap-row-column m1 0 2)))) (grid:copy-to (swap-row-column m1 0 2))))
(generate-all-array-tests matrix-transpose* t (generate-all-array-tests matrix-transpose* t
(let ((m1 (array-default '(3 3)))) (let ((m1 (array-default '(3 3))))
(cl-array (matrix-transpose* m1)))) (grid:copy-to (matrix-transpose* m1))))
(generate-all-array-tests matrix-transpose t (generate-all-array-tests matrix-transpose t
(let ((m1 (array-default '(3 3))) (let ((m1 (array-default '(3 3)))
(m2 (array-default '(3 3) t))) (m2 (array-default '(3 3) t)))
(cl-array (matrix-transpose m1 m2)))) (grid:copy-to (matrix-transpose m1 m2))))
;; Combinations ;; Combinations
;; Liam Healy, Sun Mar 26 2006 - 11:51 ;; Liam Healy, Sun Mar 26 2006 - 11:51
;; Time-stamp: <2010-07-01 21:13:06EDT combination.lisp> ;; Time-stamp: <2010-07-07 14:30:07EDT combination.lisp>
;; ;;
;; Copyright 2006, 2007, 2008, 2009 Liam M. Healy ;; Copyright 2006, 2007, 2008, 2009 Liam M. Healy
;; Distributed under the terms of the GNU General Public License ;; Distributed under the terms of the GNU General Public License
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
"Initialize the combination c to the lexicographically "Initialize the combination c to the lexicographically
last combination, i.e. (n-k,n-k+1,...,n-1).") last combination, i.e. (n-k,n-k+1,...,n-1).")
(defmfun grid:copy-to-destination ((source combination) (destination combination)) (defmfun grid::copy-to-destination ((source combination) (destination combination))
"gsl_combination_memcpy" "gsl_combination_memcpy"
(((mpointer destination) :pointer) (((mpointer destination) :pointer)
((mpointer source) :pointer)) ((mpointer source) :pointer))
......
;; Permutations ;; Permutations
;; Liam Healy, Sun Mar 26 2006 - 11:51 ;; Liam Healy, Sun Mar 26 2006 - 11:51
;; Time-stamp: <2010-07-01 21:12:59EDT permutation.lisp> ;; Time-stamp: <2010-07-07 14:30:06EDT permutation.lisp>
;; ;;
;; Copyright 2006, 2007, 2008, 2009 Liam M. Healy ;; Copyright 2006, 2007, 2008, 2009 Liam M. Healy
;; Distributed under the terms of the GNU General Public License ;; Distributed under the terms of the GNU General Public License
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
"Initialize the permutation p to the identity, i.e. "Initialize the permutation p to the identity, i.e.
(0,1,2,...,n-1).") (0,1,2,...,n-1).")
(defmfun grid:copy-to-destination ((source permutation) (destination permutation)) (defmfun grid::copy-to-destination ((source permutation) (destination permutation))
"gsl_permutation_memcpy" "gsl_permutation_memcpy"
(((mpointer destination) :pointer) (((mpointer destination) :pointer)
((mpointer source) :pointer)) ((mpointer source) :pointer))
......
;; Eigenvectors and eigenvalues ;; Eigenvectors and eigenvalues
;; Liam Healy, Sun May 21 2006 - 19:52 ;; Liam Healy, Sun May 21 2006 - 19:52
;; Time-stamp: <2010-06-29 22:15:24EDT symmetric-hermitian.lisp> ;; Time-stamp: <2010-07-07 14:25:01EDT symmetric-hermitian.lisp>
;; ;;
;; Copyright 2006, 2007, 2008, 2009 Liam M. Healy ;; Copyright 2006, 2007, 2008, 2009 Liam M. Healy
;; Distributed under the terms of the GNU General Public License ;; Distributed under the terms of the GNU General Public License
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
(let ((m1 (array-default '(5 5)))) (let ((m1 (array-default '(5 5))))
(multiple-value-bind (eval evec) (multiple-value-bind (eval evec)
(eigenvalues-eigenvectors (elt+ m1 (matrix-transpose-copy m1))) (eigenvalues-eigenvectors (elt+ m1 (matrix-transpose-copy m1)))
(list (cl-array eval) (cl-array evec))))) (list (grid:copy-to eval) (grid:copy-to evec)))))
|# |#
(defun eigenvalue-eigenvectors-example () (defun eigenvalue-eigenvectors-example ()
...@@ -165,7 +165,7 @@ ...@@ -165,7 +165,7 @@
-10.0d0 30.0d0 0.0d0 ^ -10.0d0 30.0d0 0.0d0 ^
0.0d0 0.0d0 40.0d0))) 0.0d0 0.0d0 40.0d0)))
(eigenvalues-eigenvectors mat evals evecs) (eigenvalues-eigenvectors mat evals evecs)
(values (cl-array evals) (cl-array evecs)))) (values (grid:copy-to evals) (grid:copy-to evecs))))
(save-test eigensystems (save-test eigensystems
(eigenvalue-eigenvectors-example)) (eigenvalue-eigenvectors-example))
......
;; Example FFT: transform a pulse (using the "clean" fft interface) ;; Example FFT: transform a pulse (using the "clean" fft interface)
;; Sumant Oemrawsingh, Sat Oct 31 2009 - 00:24 ;; Sumant Oemrawsingh, Sat Oct 31 2009 - 00:24
;; Time-stamp: <2010-07-06 23:16:03EDT example.lisp> ;; Time-stamp: <2010-07-07 14:21:55EDT example.lisp>
;; ;;
;; Copyright 2009 Sumant Oemrawsingh, Liam M. Healy ;; Copyright 2009 Sumant Oemrawsingh, Liam M. Healy
;; Distributed under the terms of the GNU General Public License ;; Distributed under the terms of the GNU General Public License
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
:initial-contents :initial-contents
(map 'list (map 'list
(lambda (x) (/ x (floor (size backward) stride))) (lambda (x) (/ x (floor (size backward) stride)))
(copy backward :grid-type 'array)))))) (grid:copy-to backward))))))
(multiple-value-bind (forward inverse) (multiple-value-bind (forward inverse)
(test-real-fft-noise random-vector :stride stride) (test-real-fft-noise random-vector :stride stride)
(values dft-random-vector forward random-vector inverse))))) (values dft-random-vector forward random-vector inverse)))))
......
;; Discrete Hankel Transforms. ;; Discrete Hankel Transforms.
;; Liam Healy, Sat Dec 8 2007 - 16:50 ;; Liam Healy, Sat Dec 8 2007 - 16:50
;; Time-stamp: <2010-07-06 23:13:16EDT hankel.lisp> ;; Time-stamp: <2010-07-07 14:19:28EDT hankel.lisp>
;; ;;
;; Copyright 2007, 2008, 2009 Liam M. Healy ;; Copyright 2007, 2008, 2009 Liam M. Healy
;; Distributed under the terms of the GNU General Public License ;; Distributed under the terms of the GNU General Public License
...@@ -69,8 +69,7 @@ ...@@ -69,8 +69,7 @@
(save-test hankel ; tests from dht/test.c (save-test hankel ; tests from dht/test.c
(copy (apply-hankel (make-hankel 3 1.0d0 1.0d0) #m(1.0d0 2.0d0 3.0d0)) (grid:copy-to (apply-hankel (make-hankel 3 1.0d0 1.0d0) #m(1.0d0 2.0d0 3.0d0)))
:grid-type 'array)
;; Exact, forward-inverse transform should be accurate to 2e-5 ;; Exact, forward-inverse transform should be accurate to 2e-5
(let ((hank (make-hankel 3 1.0d0 1.0d0))) (let ((hank (make-hankel 3 1.0d0 1.0d0)))
(copy (copy
...@@ -84,16 +83,14 @@ ...@@ -84,16 +83,14 @@
(loop for n from 0 below 128 (loop for n from 0 below 128
do (setf (grid:gref in n) do (setf (grid:gref in n)
(/ (1+ (expt (sample-x-hankel hank n) 2))))) (/ (1+ (expt (sample-x-hankel hank n) 2)))))
(copy (apply-hankel hank in) (grid:copy-to (apply-hankel hank in)))
:grid-type 'array))
;; Integrate[ x exp(-x) J_1(a x), {x,0,Inf}] = a F(3/2, 2; 2; -a^2) ;; Integrate[ x exp(-x) J_1(a x), {x,0,Inf}] = a F(3/2, 2; 2; -a^2)
;; expected accuracy only about 2% ;; expected accuracy only about 2%
(let ((hank (make-hankel 128 1.0d0 20.0d0)) (let ((hank (make-hankel 128 1.0d0 20.0d0))
(in (grid:make-foreign-array 'double-float :dimensions 128))) (in (grid:make-foreign-array 'double-float :dimensions 128)))
(loop for n from 0 below 128 (loop for n from 0 below 128
do (setf (grid:gref in n) (exp (- (sample-x-hankel hank n))))) do (setf (grid:gref in n) (exp (- (sample-x-hankel hank n)))))
(copy (apply-hankel hank in) (grid:copy-to (apply-hankel hank in)))
:grid-type 'array))
;; Integrate[ x^2 (1-x^2) J_1(a x), {x,0,1}] = 2/a^2 J_3(a) ;; Integrate[ x^2 (1-x^2) J_1(a x), {x,0,1}] = 2/a^2 J_3(a)
(let ((hank (make-hankel 128 1.0d0 1.0d0)) (let ((hank (make-hankel 128 1.0d0 1.0d0))
(in (grid:make-foreign-array 'double-float :dimensions 128))) (in (grid:make-foreign-array 'double-float :dimensions 128)))
...@@ -101,4 +98,4 @@ ...@@ -101,4 +98,4 @@
do (setf (grid:gref in n) do (setf (grid:gref in n)
(let ((x (sample-x-hankel hank n))) (let ((x (sample-x-hankel hank n)))
(* x (- 1 (expt x 2)))))) (* x (- 1 (expt x 2))))))
(copy (apply-hankel hank in) :grid-type 'array))) (grid:copy-to (apply-hankel hank in))))
;; The histogram structure ;; The histogram structure
;; Liam Healy, Mon Jan 1 2007 - 11:32 ;; Liam Healy, Mon Jan 1 2007 - 11:32
;; Time-stamp: <2010-07-01 21:14:48EDT histogram.lisp> ;; Time-stamp: <2010-07-07 14:30:30EDT histogram.lisp>
;; ;;
;; Copyright 2007, 2008, 2009 Liam M. Healy ;; Copyright 2007, 2008, 2009 Liam M. Healy
;; Distributed under the terms of the GNU General Public License ;; Distributed under the terms of the GNU General Public License
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
:definition :method :definition :method
:return (histogram)) :return (histogram))
(defmfun grid:copy-to-destination ((source histogram) (destination histogram)) (defmfun grid::copy-to-destination ((source histogram) (destination histogram))
"gsl_histogram_memcpy" "gsl_histogram_memcpy"
(((mpointer destination) :pointer) ((mpointer source) :pointer)) (((mpointer destination) :pointer) ((mpointer source) :pointer))
:definition :method :definition :method
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
an exact copy of the former. an exact copy of the former.
The two histograms must be of the same size.") The two histograms must be of the same size.")
(defmfun grid:copy-to-destination ((source histogram2d) (destination histogram2d)) (defmfun grid::copy-to-destination ((source histogram2d) (destination histogram2d))
"gsl_histogram2d_memcpy" "gsl_histogram2d_memcpy"
(((mpointer destination) :pointer) ((mpointer source) :pointer)) (((mpointer destination) :pointer) ((mpointer source) :pointer))
:definition :method :definition :method
...@@ -103,14 +103,14 @@ ...@@ -103,14 +103,14 @@
an exact copy of the former. an exact copy of the former.
The two histograms must be of the same size.") The two histograms must be of the same size.")
(defmfun grid:copy-making-destination ((source histogram)) (defmfun grid::copy-making-destination ((source histogram))
"gsl_histogram_clone" "gsl_histogram_clone"
(((mpointer source) :pointer)) (((mpointer source) :pointer))
:definition :method :definition :method
:c-return :pointer :c-return :pointer
:index copy) :index copy)
(defmfun grid:copy-making-destination ((source histogram2d)) (defmfun grid::copy-making-destination ((source histogram2d))
"gsl_histogram2d_clone" "gsl_histogram2d_clone"
(((mpointer source) :pointer)) (((mpointer source) :pointer))
:definition :method :definition :method
......
;; Definition of GSL objects and ways to use them. ;; Definition of GSL objects and ways to use them.
;; Liam Healy, Sun Dec 3 2006 - 10:21 ;; Liam Healy, Sun Dec 3 2006 - 10:21
;; Time-stamp: <2010-07-01 19:37:25EDT mobject.lisp> ;; Time-stamp: <2010-07-07 14:30:30EDT mobject.lisp>
;; ;;
;; Copyright 2006, 2007, 2008, 2009 Liam M. Healy ;; Copyright 2006, 2007, 2008, 2009 Liam M. Healy
;; Distributed under the terms of the GNU General Public License ;; Distributed under the terms of the GNU General Public License
...@@ -351,7 +351,7 @@ ...@@ -351,7 +351,7 @@
;;;;**************************************************************************** ;;;;****************************************************************************
#| #|
(defmethod grid:copy-making-destination :around ((object mobject)) (defmethod grid::copy-making-destination :around ((object mobject))
(if (next-method-p) (if (next-method-p)
;; The subclass method should only return the malloced ;; The subclass method should only return the malloced
;; mpointer (as from a "_clone" function); it will be put into ;; mpointer (as from a "_clone" function); it will be put into
......
;; BLAS level 1, Vector operations ;; BLAS level 1, Vector operations
;; Liam Healy, Wed Apr 26 2006 - 15:23 ;; Liam Healy, Wed Apr 26 2006 - 15:23
;; Time-stamp: <2010-06-30 19:57:28EDT blas1.lisp> ;; Time-stamp: <2010-07-07 14:25:01EDT blas1.lisp>
;; ;;
;; Copyright 2006, 2007, 2008, 2009 Liam M. Healy ;; Copyright 2006, 2007, 2008, 2009 Liam M. Healy
;; Distributed under the terms of the GNU General Public License ;; Distributed under the terms of the GNU General Public License
...@@ -233,29 +233,29 @@ ...@@ -233,29 +233,29 @@
(let ((v1 (array-default 3)) (let ((v1 (array-default 3))
(v2 (array-default 3))) (v2 (array-default 3)))
(blas-swap v2 v1) (blas-swap v2 v1)
(list (cl-array v1) (cl-array v2)))) (list (grid:copy-to v1) (grid:copy-to v2))))
(generate-all-array-tests blas-copy :float-complex (generate-all-array-tests blas-copy :float-complex
(let ((v1 (array-default 3)) (let ((v1 (array-default 3))
(v2 (array-default 3 t))) (v2 (array-default 3 t)))
(blas-copy v1 v2) (blas-copy v1 v2)
(cl-array v2))) (grid:copy-to v2)))