[lisplab-cvs] r164 - in trunk/src: fft matrix

Jørn Inge Vestgården jivestgarden at common-lisp.net
Thu May 13 17:35:24 UTC 2010


Author: jivestgarden
Date: Thu May 13 13:35:24 2010
New Revision: 164

Log:
put classes back in and bugix in fft

Modified:
   trunk/src/fft/fftw-ffi.lisp
   trunk/src/fft/level3-fft-generic.lisp
   trunk/src/matrix/level1-dge.lisp
   trunk/src/matrix/level1-zge.lisp

Modified: trunk/src/fft/fftw-ffi.lisp
==============================================================================
--- trunk/src/fft/fftw-ffi.lisp	(original)
+++ trunk/src/fft/fftw-ffi.lisp	Thu May 13 13:35:24 2010
@@ -70,8 +70,9 @@
 		   (sap+ (vector-sap b) bstart)
 		   direction
 		   flag)))
-	(|fftw_execute| plan)
-	(|fftw_destroy_plan| plan)))
+	(unwind-protect 
+	     (|fftw_execute| plan)
+	  (|fftw_destroy_plan| plan))))
     b))
 
 (defun fftw-fft2 (m n in out direction flag)
@@ -85,8 +86,9 @@
 		 (vector-sap out)		 
 		 direction
 		 flag)))
-      (|fftw_execute| plan)
-      (|fftw_destroy_plan| plan)))
+      (unwind-protect 
+	   (|fftw_execute| plan)
+	(|fftw_destroy_plan| plan))))
   out)
 
 

Modified: trunk/src/fft/level3-fft-generic.lisp
==============================================================================
--- trunk/src/fft/level3-fft-generic.lisp	(original)
+++ trunk/src/fft/level3-fft-generic.lisp	Thu May 13 13:35:24 2010
@@ -20,9 +20,7 @@
 (in-package :lisplab)
 
 (defun convert-to-matrix-zge (m)
-  (let ((m-copy (make-matrix-instance (create-matrix-description m :et :z) 
-				      (dim m)
-				      0)))
+  (let ((m-copy (mcreate* m :element-type :z)))
     (copy-contents m m-copy)
     m-copy))
 

Modified: trunk/src/matrix/level1-dge.lisp
==============================================================================
--- trunk/src/matrix/level1-dge.lisp	(original)
+++ trunk/src/matrix/level1-dge.lisp	Thu May 13 13:35:24 2010
@@ -43,7 +43,11 @@
   (:documentation "A full matrix (rows x cols) with double float elements. 
 Executes in lisp only."))
 
-(defclass matrix-dge (matrix-implementation-blas matrix-lisp-dge) ()
+(defclass matrix-blas-dge (matrix-implementation-blas matrix-lisp-dge) ()
+  (:documentation "A full matrix (rows x cols) with double float matrix elements.
+Executes in FFI if possible. If not it executes in lisp."))
+
+(defclass matrix-dge ( matrix-blas-dge) ()
   (:documentation "A full matrix (rows x cols) with double float matrix elements.
 Executes in FFI if possible. If not it executes in lisp."))
 

Modified: trunk/src/matrix/level1-zge.lisp
==============================================================================
--- trunk/src/matrix/level1-zge.lisp	(original)
+++ trunk/src/matrix/level1-zge.lisp	Thu May 13 13:35:24 2010
@@ -41,10 +41,15 @@
   (:documentation "A full matrix (rows x cols) with complex double float elements. 
 Executes in lisp only."))
 
-(defclass matrix-zge (matrix-implementation-blas matrix-lisp-zge) ()
+(defclass matrix-blas-zge (matrix-implementation-blas matrix-lisp-zge) ()
    (:documentation "A full matrix (rows x cols) with complex double float matrix elements.
 Executes in FFI if possible. If not it executes in lisp."))
 
+(defclass matrix-zge (matrix-blas-zge) ()
+   (:documentation "A full matrix (rows x cols) with complex double float matrix elements.
+Executes in FFI if possible. If not it executes in lisp."))
+
+
 (defmethod make-matrix-class ((a (eql :z)) (b (eql :ge)) (c (eql :base)))
   (find-class 'matrix-base-zge))
 




More information about the lisplab-cvs mailing list