Commit ce11b970 authored by Liam M. Healy's avatar Liam M. Healy

New arglist for grid:ensure-foreign-array; replace #'dot calls with #'grid:inner

parent 535bf393
;; BLAS level 1, Vector operations
;; Liam Healy, Wed Apr 26 2006 - 15:23
;; Time-stamp: <2011-02-12 16:13:02EST blas1.lisp>
;; Time-stamp: <2011-04-23 17:04:06EDT blas1.lisp>
;;
;; Copyright 2006, 2007, 2008, 2009, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -210,7 +210,7 @@
(generate-all-array-tests dot :float-complex
(let ((v1 (array-default 8))
(v2 (array-default 8)))
(dot v1 v2)))
(grid:inner v1 v2)))
(generate-all-array-tests cdot :complex
(let ((v1 (array-default 8))
......
;; BLAS level 2, Matrix-vector operations
;; Liam Healy, Wed Apr 26 2006 - 21:08
;; Time-stamp: <2011-02-19 13:08:23EST blas2.lisp>
;; Time-stamp: <2011-04-23 17:15:33EDT blas2.lisp>
;;
;; Copyright 2006, 2007, 2008, 2009, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -54,7 +54,7 @@
&aux
(yarr
(grid:ensure-foreign-array
y (matrix-product-dimensions A x) nil element-type 0)))
y (matrix-product-dimensions A x) element-type 0)))
("gsl_blas_" :type "gemv")
((transa cblas-transpose) (alpha :element-c-type) ((mpointer A) :pointer)
((mpointer x) :pointer) (beta :element-c-type) ((mpointer yarr) :pointer))
......
;; Cholesky Decomposition
;; Liam Healy, Wed May 3 2006 - 16:38
;; Time-stamp: <2011-02-19 13:08:24EST cholesky.lisp>
;; Time-stamp: <2011-04-23 17:13:59EDT cholesky.lisp>
;;
;; Copyright 2006, 2007, 2008, 2009, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -53,7 +53,7 @@
(defmfun cholesky-solve
((A grid:matrix) (b vector) &optional x-spec
&aux
(x (grid:ensure-foreign-array x-spec (grid:dimensions b) t)))
(x (grid:ensure-foreign-array x-spec (grid:dimensions b))))
(("gsl_linalg" :complex "_cholesky_svx")
("gsl_linalg" :complex "_cholesky_solve"))
((((mpointer A) :pointer) ((mpointer b) :pointer))
......
;; Householder Transformations
;; Liam Healy, Wed May 10 2006 - 10:03
;; Time-stamp: <2011-02-19 13:08:23EST householder.lisp>
;; Time-stamp: <2011-04-23 17:14:09EDT householder.lisp>
;;
;; Copyright 2006, 2007, 2008, 2009, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -87,7 +87,7 @@
(defmfun householder-solve
(A b &optional x-spec
&aux
(x (grid:ensure-foreign-array x-spec (grid:dimensions b) t)))
(x (grid:ensure-foreign-array x-spec (grid:dimensions b))))
("gsl_linalg_HH_svx" "gsl_linalg_HH_solve")
((((mpointer A) :pointer) ((mpointer b) :pointer))
(((mpointer A) :pointer) ((mpointer b) :pointer)
......
;; QR decomposition
;; Liam Healy 2008-02-17 11:05:20EST qr.lisp
;; Time-stamp: <2011-02-19 13:08:23EST qr.lisp>
;; Time-stamp: <2011-04-23 17:14:30EDT qr.lisp>
;;
;; Copyright 2008, 2009, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -62,7 +62,7 @@
(defmfun QR-solve
(QR tau b &optional x-spec
&aux
(x (grid:ensure-foreign-array x-spec (grid:dimensions b) t)))
(x (grid:ensure-foreign-array x-spec (grid:dimensions b))))
("gsl_linalg_QR_svx" "gsl_linalg_QR_solve")
((((mpointer QR) :pointer) ((mpointer tau) :pointer)
((mpointer b) :pointer))
......@@ -129,7 +129,7 @@
(defmfun QR-Rsolve
(QR b &optional x-spec
&aux
(x (grid:ensure-foreign-array x-spec (grid:dimensions b) t)))
(x (grid:ensure-foreign-array x-spec (grid:dimensions b))))
("gsl_linalg_QR_Rsvx" "gsl_linalg_QR_Rsolve")
((((mpointer QR) :pointer) ((mpointer b) :pointer))
(((mpointer QR) :pointer) ((mpointer b) :pointer) ((mpointer x) :pointer)))
......@@ -189,7 +189,7 @@
(defmfun R-solve
(R b &optional x-spec
&aux
(x (grid:ensure-foreign-array x-spec (grid:dimensions b) t)))
(x (grid:ensure-foreign-array x-spec (grid:dimensions b))))
("gsl_linalg_R_svx" "gsl_linalg_R_solve")
((((mpointer R) :pointer) ((mpointer b) :pointer))
(((mpointer R) :pointer) ((mpointer b) :pointer) ((mpointer x) :pointer)))
......
;; QR with column pivoting
;; Liam Healy, Fri Apr 28 2006 - 16:53
;; Time-stamp: <2011-02-19 13:08:22EST qrpt.lisp>
;; Time-stamp: <2011-04-23 17:15:46EDT qrpt.lisp>
;;
;; Copyright 2006, 2007, 2008, 2009, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -80,7 +80,7 @@
(defmfun QRPT-solve
(QR tau permutation b &optional x-spec
&aux
(x (grid:ensure-foreign-array x-spec (grid:dimensions b) t)))
(x (grid:ensure-foreign-array x-spec (grid:dimensions b))))
("gsl_linalg_QRPT_svx" "gsl_linalg_QRPT_solve")
((((mpointer QR) :pointer) ((mpointer tau) :pointer)
((mpointer permutation) :pointer) ((mpointer b) :pointer))
......@@ -131,7 +131,7 @@
(defmfun QRPT-Rsolve
(QR permutation b &optional x-spec
&aux
(x (grid:ensure-foreign-array x-spec (grid:dimensions b) t)))
(x (grid:ensure-foreign-array x-spec (grid:dimensions b))))
("gsl_linalg_QRPT_Rsvx" "gsl_linalg_QRPT_Rsolve")
((((mpointer QR) :pointer) ((mpointer permutation) :pointer)
((mpointer b) :pointer))
......
......@@ -32,7 +32,7 @@
'SINGLE-FLOAT
:INITIAL-CONTENTS
'(32.5f0 42.73f0 -17.24f0 43.31f0 -16.12f0 -8.25f0 21.44f0 -49.08f0))))
(DOT V1 V2))))
(GRID:INNER V1 V2))))
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST 6.528400000000033d0)
(MULTIPLE-VALUE-LIST
......@@ -48,7 +48,7 @@
'(32.5d0 42.73d0 -17.24d0 43.31d0
-16.12d0 -8.25d0 21.44d0
-49.08d0))))
(DOT V1 V2))))
(GRID:INNER V1 V2))))
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST #C(625.9737f0 -4310.1177f0))
(MULTIPLE-VALUE-LIST
......@@ -66,7 +66,7 @@
'(#C(32.5f0 42.73f0) #C(-17.24f0 43.31f0) #C(-16.12f0 -8.25f0)
#C(21.44f0 -49.08f0) #C(-39.66f0 -49.46f0)
#C(19.68f0 -5.55f0) #C(-8.82f0 25.37f0) #C(-30.58f0 31.67f0)))))
(DOT V1 V2))))
(GRID:INNER V1 V2))))
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST #C(625.9736000000007d0 -4310.1183d0))
(MULTIPLE-VALUE-LIST
......@@ -87,4 +87,4 @@
#C(-39.66d0 -49.46d0)
#C(19.68d0 -5.55d0) #C(-8.82d0 25.37d0)
#C(-30.58d0 31.67d0)))))
(DOT V1 V2)))))
(GRID:INNER V1 V2)))))
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