Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
antik
gsll
Commits
87dcb940
Commit
87dcb940
authored
Dec 26, 2013
by
Liam M. Healy
Browse files
Merge branch 'antik-multiple-systems' of
git://repo.or.cz/gsll
into antik-multiple-systems
parents
85f9ecd9
1107fc49
Changes
2
Hide whitespace changes
Inline
Side-by-side
linear-algebra/blas2.lisp
View file @
87dcb940
;; BLAS level 2, Matrix-vector operations
;; Liam Healy, Wed Apr 26 2006 - 21:08
;; Time-stamp: <201
1
-1
0
-2
3 20:36:31ED
T blas2.lisp>
;; Time-stamp: <201
3
-1
2
-2
5 12:08:15ES
T blas2.lisp>
;;
;; Copyright 2006, 2007, 2008, 2009, 2010, 2011 Liam M. Healy
;; Copyright 2006, 2007, 2008, 2009, 2010, 2011
, 2013
Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
...
...
@@ -26,11 +26,20 @@
;;;; Functions
;;;;****************************************************************************
(
defun
matrix-product-dimensions
(
a
b
)
(
if
(
typep
b
'grid:matrix
)
(
list
(
first
(
grid:dimensions
a
))
(
second
(
grid:dimensions
b
)))
(
first
(
grid:dimensions
a
))))
(
defun
matrix-product-dimensions
(
a
b
&key
(
transa
:notrans
)
(
transb
:notrans
))
(
let
((
dima
(
funcall
(
ecase
transa
(
:notrans
#'
first
)
(
:trans
#'
second
))
(
grid:dimensions
a
))))
(
if
(
typep
b
'grid:matrix
)
(
list
dima
(
funcall
(
ecase
transb
(
:notrans
#'
second
)
(
:trans
#'
first
))
(
grid:dimensions
b
)))
dima
)))
(
defmfun
matrix-product
((
A
grid:matrix
)
(
x
vector
)
...
...
@@ -40,7 +49,7 @@
&aux
(
yarr
(
grid:ensure-foreign-array
y
(
matrix-product-dimensions
A
x
)
element-type
0
)))
y
(
matrix-product-dimensions
A
x
:transa
transa
)
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
))
...
...
linear-algebra/blas3.lisp
View file @
87dcb940
;; BLAS level 3, Matrix-matrix operations
;; Liam Healy, Wed Apr 26 2006 - 21:08
;; Time-stamp: <201
1
-1
0
-2
3 20:37:22ED
T blas3.lisp>
;; Time-stamp: <201
3
-1
2
-2
5 12:10:44ES
T blas3.lisp>
;;
;; Copyright 2006, 2007, 2008, 2009, 2010, 2011 Liam M. Healy
;; Copyright 2006, 2007, 2008, 2009, 2010, 2011
, 2013
Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
...
...
@@ -34,8 +34,10 @@
&aux
(
Carr
(
or
C
(
grid:make-foreign-array
element-type
:dimensions
(
matrix-product-dimensions
A
B
)
:initial-element
0
))))
(
grid:make-foreign-array
element-type
:dimensions
(
matrix-product-dimensions
A
B
:transa
TransA
:transb
TransB
)
:initial-element
0
))))
(
"gsl_blas_"
:type
"gemm"
)
((
TransA
cblas-transpose
)
(
TransB
cblas-transpose
)
(
alpha
:element-c-type
)
((
mpointer
A
)
:pointer
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment