From ce11b97057f7b5b76ec6f31a04a4aa6ed1100915 Mon Sep 17 00:00:00 2001
From: "Liam M. Healy" <lhealy@common-lisp.net>
Date: Sat, 23 Apr 2011 18:12:47 -0400
Subject: [PATCH] New arglist for grid:ensure-foreign-array; replace #'dot
 calls with #'grid:inner

---
 linear-algebra/blas1.lisp       | 4 ++--
 linear-algebra/blas2.lisp       | 4 ++--
 linear-algebra/cholesky.lisp    | 4 ++--
 linear-algebra/householder.lisp | 4 ++--
 linear-algebra/qr.lisp          | 8 ++++----
 linear-algebra/qrpt.lisp        | 6 +++---
 tests/dot.lisp                  | 8 ++++----
 7 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/linear-algebra/blas1.lisp b/linear-algebra/blas1.lisp
index 856f2b17..8ad8f5dd 100644
--- a/linear-algebra/blas1.lisp
+++ b/linear-algebra/blas1.lisp
@@ -1,6 +1,6 @@
 ;; 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))
diff --git a/linear-algebra/blas2.lisp b/linear-algebra/blas2.lisp
index 39f2c714..2b421480 100644
--- a/linear-algebra/blas2.lisp
+++ b/linear-algebra/blas2.lisp
@@ -1,6 +1,6 @@
 ;; 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))
diff --git a/linear-algebra/cholesky.lisp b/linear-algebra/cholesky.lisp
index fa5a8d31..34eeb5cf 100644
--- a/linear-algebra/cholesky.lisp
+++ b/linear-algebra/cholesky.lisp
@@ -1,6 +1,6 @@
 ;; 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))
diff --git a/linear-algebra/householder.lisp b/linear-algebra/householder.lisp
index 4b6e27cd..a903e68d 100644
--- a/linear-algebra/householder.lisp
+++ b/linear-algebra/householder.lisp
@@ -1,6 +1,6 @@
 ;; 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)
diff --git a/linear-algebra/qr.lisp b/linear-algebra/qr.lisp
index dfe5796f..51cb32c3 100644
--- a/linear-algebra/qr.lisp
+++ b/linear-algebra/qr.lisp
@@ -1,6 +1,6 @@
 ;; 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)))
diff --git a/linear-algebra/qrpt.lisp b/linear-algebra/qrpt.lisp
index af9c087f..f38b3003 100644
--- a/linear-algebra/qrpt.lisp
+++ b/linear-algebra/qrpt.lisp
@@ -1,6 +1,6 @@
 ;; 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))
diff --git a/tests/dot.lisp b/tests/dot.lisp
index dae47afb..80b78731 100644
--- a/tests/dot.lisp
+++ b/tests/dot.lisp
@@ -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)))))
-- 
GitLab