diff options
author | Reiner Pope <reiner.pope@gmail.com> | 2012-01-07 11:47:06 +1100 |
---|---|---|
committer | Reiner Pope <reiner.pope@gmail.com> | 2012-01-07 11:47:06 +1100 |
commit | fdf8d8778d52cf14aec493ef5ab18d363b900ed7 (patch) | |
tree | ca761c585a7a5287eae45a673f10f58931c8353a /lib/Numeric/LinearAlgebra | |
parent | 4029bf2f48c7e0564fe23de8dc74409d1206ca0d (diff) |
Make Matrix a product type
Diffstat (limited to 'lib/Numeric/LinearAlgebra')
-rw-r--r-- | lib/Numeric/LinearAlgebra/LAPACK.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Numeric/LinearAlgebra/LAPACK.hs b/lib/Numeric/LinearAlgebra/LAPACK.hs index d1aa564..349650c 100644 --- a/lib/Numeric/LinearAlgebra/LAPACK.hs +++ b/lib/Numeric/LinearAlgebra/LAPACK.hs | |||
@@ -58,11 +58,11 @@ foreign import ccall "multiplyC" zgemmc :: CInt -> CInt -> TCMCMCM | |||
58 | foreign import ccall "multiplyF" sgemmc :: CInt -> CInt -> TFMFMFM | 58 | foreign import ccall "multiplyF" sgemmc :: CInt -> CInt -> TFMFMFM |
59 | foreign import ccall "multiplyQ" cgemmc :: CInt -> CInt -> TQMQMQM | 59 | foreign import ccall "multiplyQ" cgemmc :: CInt -> CInt -> TQMQMQM |
60 | 60 | ||
61 | isT MF{} = 0 | 61 | isT Matrix{order = ColumnMajor} = 0 |
62 | isT MC{} = 1 | 62 | isT Matrix{order = RowMajor} = 1 |
63 | 63 | ||
64 | tt x@MF{} = x | 64 | tt x@Matrix{order = RowMajor} = x |
65 | tt x@MC{} = trans x | 65 | tt x@Matrix{order = ColumnMajor} = trans x |
66 | 66 | ||
67 | multiplyAux f st a b = unsafePerformIO $ do | 67 | multiplyAux f st a b = unsafePerformIO $ do |
68 | when (cols a /= rows b) $ error $ "inconsistent dimensions in matrix product "++ | 68 | when (cols a /= rows b) $ error $ "inconsistent dimensions in matrix product "++ |