summaryrefslogtreecommitdiff
path: root/packages/base/src/Internal/LAPACK.hs
diff options
context:
space:
mode:
Diffstat (limited to 'packages/base/src/Internal/LAPACK.hs')
-rw-r--r--packages/base/src/Internal/LAPACK.hs16
1 files changed, 8 insertions, 8 deletions
diff --git a/packages/base/src/Internal/LAPACK.hs b/packages/base/src/Internal/LAPACK.hs
index 469b0d5..8df568d 100644
--- a/packages/base/src/Internal/LAPACK.hs
+++ b/packages/base/src/Internal/LAPACK.hs
@@ -36,8 +36,8 @@ foreign import ccall unsafe "multiplyR" dgemmc :: CInt -> CInt -> TMMM R
36foreign import ccall unsafe "multiplyC" zgemmc :: CInt -> CInt -> TMMM C 36foreign import ccall unsafe "multiplyC" zgemmc :: CInt -> CInt -> TMMM C
37foreign import ccall unsafe "multiplyF" sgemmc :: CInt -> CInt -> TMMM F 37foreign import ccall unsafe "multiplyF" sgemmc :: CInt -> CInt -> TMMM F
38foreign import ccall unsafe "multiplyQ" cgemmc :: CInt -> CInt -> TMMM Q 38foreign import ccall unsafe "multiplyQ" cgemmc :: CInt -> CInt -> TMMM Q
39foreign import ccall unsafe "multiplyI" c_multiplyI :: CInt ::> CInt ::> CInt ::> Ok 39foreign import ccall unsafe "multiplyI" c_multiplyI :: I -> I ::> I ::> I ::> Ok
40foreign import ccall unsafe "multiplyL" c_multiplyL :: Z ::> Z ::> Z ::> Ok 40foreign import ccall unsafe "multiplyL" c_multiplyL :: Z -> Z ::> Z ::> Z ::> Ok
41 41
42isT Matrix{order = ColumnMajor} = 0 42isT Matrix{order = ColumnMajor} = 0
43isT Matrix{order = RowMajor} = 1 43isT Matrix{order = RowMajor} = 1
@@ -68,20 +68,20 @@ multiplyF a b = multiplyAux sgemmc "sgemmc" a b
68multiplyQ :: Matrix (Complex Float) -> Matrix (Complex Float) -> Matrix (Complex Float) 68multiplyQ :: Matrix (Complex Float) -> Matrix (Complex Float) -> Matrix (Complex Float)
69multiplyQ a b = multiplyAux cgemmc "cgemmc" a b 69multiplyQ a b = multiplyAux cgemmc "cgemmc" a b
70 70
71multiplyI :: Matrix CInt -> Matrix CInt -> Matrix CInt 71multiplyI :: I -> Matrix CInt -> Matrix CInt -> Matrix CInt
72multiplyI a b = unsafePerformIO $ do 72multiplyI m a b = unsafePerformIO $ do
73 when (cols a /= rows b) $ error $ 73 when (cols a /= rows b) $ error $
74 "inconsistent dimensions in matrix product "++ shSize a ++ " x " ++ shSize b 74 "inconsistent dimensions in matrix product "++ shSize a ++ " x " ++ shSize b
75 s <- createMatrix ColumnMajor (rows a) (cols b) 75 s <- createMatrix ColumnMajor (rows a) (cols b)
76 app3 c_multiplyI omat a omat b omat s "c_multiplyI" 76 app3 (c_multiplyI m) omat a omat b omat s "c_multiplyI"
77 return s 77 return s
78 78
79multiplyL :: Matrix Z -> Matrix Z -> Matrix Z 79multiplyL :: Z -> Matrix Z -> Matrix Z -> Matrix Z
80multiplyL a b = unsafePerformIO $ do 80multiplyL m a b = unsafePerformIO $ do
81 when (cols a /= rows b) $ error $ 81 when (cols a /= rows b) $ error $
82 "inconsistent dimensions in matrix product "++ shSize a ++ " x " ++ shSize b 82 "inconsistent dimensions in matrix product "++ shSize a ++ " x " ++ shSize b
83 s <- createMatrix ColumnMajor (rows a) (cols b) 83 s <- createMatrix ColumnMajor (rows a) (cols b)
84 app3 c_multiplyL omat a omat b omat s "c_multiplyL" 84 app3 (c_multiplyL m) omat a omat b omat s "c_multiplyL"
85 return s 85 return s
86 86
87----------------------------------------------------------------------------- 87-----------------------------------------------------------------------------