diff options
Diffstat (limited to 'packages/base/src/Internal/LAPACK.hs')
-rw-r--r-- | packages/base/src/Internal/LAPACK.hs | 16 |
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 | |||
36 | foreign import ccall unsafe "multiplyC" zgemmc :: CInt -> CInt -> TMMM C | 36 | foreign import ccall unsafe "multiplyC" zgemmc :: CInt -> CInt -> TMMM C |
37 | foreign import ccall unsafe "multiplyF" sgemmc :: CInt -> CInt -> TMMM F | 37 | foreign import ccall unsafe "multiplyF" sgemmc :: CInt -> CInt -> TMMM F |
38 | foreign import ccall unsafe "multiplyQ" cgemmc :: CInt -> CInt -> TMMM Q | 38 | foreign import ccall unsafe "multiplyQ" cgemmc :: CInt -> CInt -> TMMM Q |
39 | foreign import ccall unsafe "multiplyI" c_multiplyI :: CInt ::> CInt ::> CInt ::> Ok | 39 | foreign import ccall unsafe "multiplyI" c_multiplyI :: I -> I ::> I ::> I ::> Ok |
40 | foreign import ccall unsafe "multiplyL" c_multiplyL :: Z ::> Z ::> Z ::> Ok | 40 | foreign import ccall unsafe "multiplyL" c_multiplyL :: Z -> Z ::> Z ::> Z ::> Ok |
41 | 41 | ||
42 | isT Matrix{order = ColumnMajor} = 0 | 42 | isT Matrix{order = ColumnMajor} = 0 |
43 | isT Matrix{order = RowMajor} = 1 | 43 | isT Matrix{order = RowMajor} = 1 |
@@ -68,20 +68,20 @@ multiplyF a b = multiplyAux sgemmc "sgemmc" a b | |||
68 | multiplyQ :: Matrix (Complex Float) -> Matrix (Complex Float) -> Matrix (Complex Float) | 68 | multiplyQ :: Matrix (Complex Float) -> Matrix (Complex Float) -> Matrix (Complex Float) |
69 | multiplyQ a b = multiplyAux cgemmc "cgemmc" a b | 69 | multiplyQ a b = multiplyAux cgemmc "cgemmc" a b |
70 | 70 | ||
71 | multiplyI :: Matrix CInt -> Matrix CInt -> Matrix CInt | 71 | multiplyI :: I -> Matrix CInt -> Matrix CInt -> Matrix CInt |
72 | multiplyI a b = unsafePerformIO $ do | 72 | multiplyI 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 | ||
79 | multiplyL :: Matrix Z -> Matrix Z -> Matrix Z | 79 | multiplyL :: Z -> Matrix Z -> Matrix Z -> Matrix Z |
80 | multiplyL a b = unsafePerformIO $ do | 80 | multiplyL 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 | ----------------------------------------------------------------------------- |