summaryrefslogtreecommitdiff
path: root/lib/Numeric
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2012-01-07 04:28:58 -0800
committerAlberto Ruiz <aruiz@um.es>2012-01-07 04:28:58 -0800
commita6c307a0d9c3b48bf80d7012b893f2f9d1db9487 (patch)
treeca761c585a7a5287eae45a673f10f58931c8353a /lib/Numeric
parent2b009db14f1d3d4985f0274b71ed9ad86e9e2b7b (diff)
parentfdf8d8778d52cf14aec493ef5ab18d363b900ed7 (diff)
Merge pull request #6 from reinerp/unsafe-building-primitives
Unsafe building/reading primitives
Diffstat (limited to 'lib/Numeric')
-rw-r--r--lib/Numeric/LinearAlgebra/LAPACK.hs8
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
58foreign import ccall "multiplyF" sgemmc :: CInt -> CInt -> TFMFMFM 58foreign import ccall "multiplyF" sgemmc :: CInt -> CInt -> TFMFMFM
59foreign import ccall "multiplyQ" cgemmc :: CInt -> CInt -> TQMQMQM 59foreign import ccall "multiplyQ" cgemmc :: CInt -> CInt -> TQMQMQM
60 60
61isT MF{} = 0 61isT Matrix{order = ColumnMajor} = 0
62isT MC{} = 1 62isT Matrix{order = RowMajor} = 1
63 63
64tt x@MF{} = x 64tt x@Matrix{order = RowMajor} = x
65tt x@MC{} = trans x 65tt x@Matrix{order = ColumnMajor} = trans x
66 66
67multiplyAux f st a b = unsafePerformIO $ do 67multiplyAux 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 "++