diff options
Diffstat (limited to 'packages/base/src/Numeric')
-rw-r--r-- | packages/base/src/Numeric/LinearAlgebra/LAPACK.hs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/packages/base/src/Numeric/LinearAlgebra/LAPACK.hs b/packages/base/src/Numeric/LinearAlgebra/LAPACK.hs index 219d996..6fb2b13 100644 --- a/packages/base/src/Numeric/LinearAlgebra/LAPACK.hs +++ b/packages/base/src/Numeric/LinearAlgebra/LAPACK.hs | |||
@@ -58,7 +58,7 @@ foreign import ccall unsafe "multiplyR" dgemmc :: CInt -> CInt -> TMMM | |||
58 | foreign import ccall unsafe "multiplyC" zgemmc :: CInt -> CInt -> TCMCMCM | 58 | foreign import ccall unsafe "multiplyC" zgemmc :: CInt -> CInt -> TCMCMCM |
59 | foreign import ccall unsafe "multiplyF" sgemmc :: CInt -> CInt -> TFMFMFM | 59 | foreign import ccall unsafe "multiplyF" sgemmc :: CInt -> CInt -> TFMFMFM |
60 | foreign import ccall unsafe "multiplyQ" cgemmc :: CInt -> CInt -> TQMQMQM | 60 | foreign import ccall unsafe "multiplyQ" cgemmc :: CInt -> CInt -> TQMQMQM |
61 | foreign import ccall unsafe "multiplyI" c_multiplyI :: CInt -> CInt -> (CM CInt (CM CInt (CM CInt (IO CInt)))) | 61 | foreign import ccall unsafe "multiplyI" c_multiplyI :: OM CInt (OM CInt (OM CInt (IO CInt))) |
62 | 62 | ||
63 | isT Matrix{order = ColumnMajor} = 0 | 63 | isT Matrix{order = ColumnMajor} = 0 |
64 | isT Matrix{order = RowMajor} = 1 | 64 | isT Matrix{order = RowMajor} = 1 |
@@ -90,8 +90,12 @@ multiplyQ :: Matrix (Complex Float) -> Matrix (Complex Float) -> Matrix (Complex | |||
90 | multiplyQ a b = multiplyAux cgemmc "cgemmc" a b | 90 | multiplyQ a b = multiplyAux cgemmc "cgemmc" a b |
91 | 91 | ||
92 | multiplyI :: Matrix CInt -> Matrix CInt -> Matrix CInt | 92 | multiplyI :: Matrix CInt -> Matrix CInt -> Matrix CInt |
93 | multiplyI = multiplyAux c_multiplyI "c_multiplyI" | 93 | multiplyI a b = unsafePerformIO $ do |
94 | 94 | when (cols a /= rows b) $ error $ | |
95 | "inconsistent dimensions in matrix product "++ shSize a ++ " x " ++ shSize b | ||
96 | s <- createMatrix ColumnMajor (rows a) (cols b) | ||
97 | app3 c_multiplyI omat a omat b omat s "c_multiplyI" | ||
98 | return s | ||
95 | 99 | ||
96 | ----------------------------------------------------------------------------- | 100 | ----------------------------------------------------------------------------- |
97 | foreign import ccall unsafe "svd_l_R" dgesvd :: TMMVM | 101 | foreign import ccall unsafe "svd_l_R" dgesvd :: TMMVM |