|
From: Akshay S. <ak...@us...> - 2012-03-19 03:44:36
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "matlisp".
The branch, matlisp-cffi has been updated
via 83c3111d290cc5994b05dcc32e2ee51cb1529f1a (commit)
via 7018af71d307ae84ad75a29a79d61db33d981430 (commit)
via 55a0678924a585263937fdff69c5d522f1589d7a (commit)
via ced92c7a0cbf00be10fd0dff010a4768130da9c1 (commit)
via 74e3f184bf5e3b0974d145a823b4f86e33e00a1a (commit)
via 45962c22d9931aa0961dca11931b50d884e3ec01 (commit)
from 514db2b95e68cd882d51d9a6d603fc24b6f0b2bb (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 83c3111d290cc5994b05dcc32e2ee51cb1529f1a
Merge: 7018af7 55a0678
Author: Akshay Srinivasan <aks...@gm...>
Date: Mon Mar 19 09:11:27 2012 +0530
Merge branch 'master' into matlisp-cffi
commit 7018af71d307ae84ad75a29a79d61db33d981430
Author: Akshay Srinivasan <aks...@gm...>
Date: Mon Mar 19 09:09:41 2012 +0530
-> Fixed rand(), more tweaks to gem{m,v}.lisp
diff --git a/src/gemm.lisp b/src/gemm.lisp
index 97dbb6c..419be54 100644
--- a/src/gemm.lisp
+++ b/src/gemm.lisp
@@ -246,10 +246,14 @@
;
(defmethod gemm! ((alpha number) (a real-matrix) (b real-matrix)
- (beta number) (c complex-matrix)
+ (beta complex) (c complex-matrix)
&optional (job :nn))
- (scal! (complex-coerce beta) c)
- (gemm! alpha a b 1d0 (realpart! c) job)
+ (let ((r-c (realpart! c))
+ (c-be (complex-coerce beta)))
+ (declare (type real-matrix c)
+ (type complex-double-float c-al))
+ (scal! c-be c)
+ (gemm! alpha a b 1d0 r-c job))
c)
;
diff --git a/src/gemv.lisp b/src/gemv.lisp
index 4ec41be..88da9df 100644
--- a/src/gemv.lisp
+++ b/src/gemv.lisp
@@ -113,9 +113,18 @@
(complex-coerce beta) y job))
;
-(defmethod gemv! ((alpha number) (A real-matrix) (x real-matrix)
+(defmethod gemv! ((alpha cl:real) (A real-matrix) (x real-matrix)
+ (beta complex) (y complex-matrix) &optional (job :n))
+ (let ((r-y (realpart! y)))
+ (declare (type real-matrix r-y))
+ ;; y <- \beta * y
+ (scal! (complex-coerce beta) y)
+ ;; y <- y + \alpha * A o x
+ (real-double-gemv!-typed (coerce alpha 'double-float) A x 1d0 r-y job)))
+
+(defmethod gemv! ((alpha complex) (A real-matrix) (x real-matrix)
(beta complex) (y complex-matrix) &optional (job :n))
- ;; y <- \beta * y
+ ;; y <- \beta * y
(scal! (complex-coerce beta) y)
;; y <- y + \alpha * A o x
(gemv! alpha A x 1d0 y job))
@@ -145,7 +154,7 @@
;; (realpart! y) <- \beta * (realpart! y) + (realpart \alpha) . A o x
(real-double-gemv!-typed r-al A x r-be r-y job)
;; (imagpart! y) <- \beta * (imagpart! y) + (imagpart \alpha) . A o x
- (real-double-gemv!-typed i-al A x r-be i-y job))
+ (real-double-gemv!-typed i-al A x r-be i-y job))
y)
;
diff --git a/src/special.lisp b/src/special.lisp
index 20138bc..e00193f 100644
--- a/src/special.lisp
+++ b/src/special.lisp
@@ -147,7 +147,7 @@
(unless (typep state 'random-state)
(error "STATE must be a RANDOM-STATE, not a ~A" (type-of state)))
- (locally (declare (type fixnum n m))
+ (locally (declare (type fixnum n m))
(let* ((size (* n m))
(store (allocate-real-store size))
(unity #.(coerce 1 'real-matrix-element-type)))
@@ -158,5 +158,7 @@
(declare (fixnum k))
(setf (aref store k) (random unity state)))
- (make-instance 'real-matrix :nrows n :ncols m :store store))))
+ (make-instance 'real-matrix
+ :nrows n :ncols m
+ :row-stride m :col-stride 1 :store store))))
-----------------------------------------------------------------------
Summary of changes:
configure | 76 +++++++++++++++++++++++
configure.ac | 147 ++++++++++++++++++++++----------------------
lib-src/compat/Makefile.am | 4 +-
lib/lazy-loader.lisp.in | 4 +-
src/gemm.lisp | 10 ++-
src/gemv.lisp | 15 ++++-
src/special.lisp | 6 +-
7 files changed, 177 insertions(+), 85 deletions(-)
hooks/post-receive
--
matlisp
|