|
From: Akshay S. <aks...@gm...> - 2012-03-17 11:11:47
|
> -----------------------------------------------------------------------
>
> Summary of changes: matlisp.asd | 8 +-
> packages.lisp | 2 + src/axpy.lisp
> | 6 +- src/foreign-real-matrix.lisp | 18 ++- src/gemm.lisp
> | 254 ++++++++++++++++++++++++++---------------- src/gemv.lisp
> | 44 +++++++- src/real-matrix.lisp | 3 +-
> src/standard-matrix.lisp | 26 +++-- src/utilities.lisp
> | 8 +- 9 files changed, 243 insertions(+), 126 deletions(-)
>
There are major changes in this commit. Level-2 and Level-3 operations
are now possible with gemm! and gemv!, which can handle sliced matrices
(quite well in fact :)
What do you think ?
Here's a little snippet of code:
-------------------------------------------------------
;;Create a 4x4 matrix with random entries
(defvar d (make-complex-matrix 4 4))
(dotimes (i 4)
(dotimes (j 4)
(setf (matrix-ref-2d d i j)
(complex-coerce (complex (cl:random 10) (cl:random 10))))))
;;Submatrix of d starting at (1, 1) or size (2, 2)
(defvar e (sub! d 1 1 2 2))
;;
(defvar a (make-real-matrix '((1 2) (3 4))))
(defvar c (make-real-matrix 2 2))
;;Can't use dgemm here, because of the way (imagpart! e) is arranged
(gemm! 1d0 (imagpart! e) a 0d0 c)
------------------------------------------------------
Akshay
|