summaryrefslogtreecommitdiff
path: root/packages/base/src/Internal/LAPACK.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2015-06-22 11:54:16 +0200
committerAlberto Ruiz <aruiz@um.es>2015-06-22 11:54:16 +0200
commit8053285df72177dab6b6d86241307d743fa0025f (patch)
tree582a033ef3d7e10b355d844d57b608d8f3efa753 /packages/base/src/Internal/LAPACK.hs
parentbd1bca66174ec3c0feb38c531cfc611cc0239b21 (diff)
implicit rowOrder
Diffstat (limited to 'packages/base/src/Internal/LAPACK.hs')
-rw-r--r--packages/base/src/Internal/LAPACK.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/base/src/Internal/LAPACK.hs b/packages/base/src/Internal/LAPACK.hs
index 3a9abbb..fc9e3ad 100644
--- a/packages/base/src/Internal/LAPACK.hs
+++ b/packages/base/src/Internal/LAPACK.hs
@@ -1,4 +1,5 @@
1{-# LANGUAGE TypeOperators #-} 1{-# LANGUAGE TypeOperators #-}
2{-# LANGUAGE ViewPatterns #-}
2 3
3----------------------------------------------------------------------------- 4-----------------------------------------------------------------------------
4-- | 5-- |
@@ -49,11 +50,11 @@ foreign import ccall unsafe "multiplyQ" cgemmc :: CInt -> CInt -> TMMM Q
49foreign import ccall unsafe "multiplyI" c_multiplyI :: I -> I ::> I ::> I ::> Ok 50foreign import ccall unsafe "multiplyI" c_multiplyI :: I -> I ::> I ::> I ::> Ok
50foreign import ccall unsafe "multiplyL" c_multiplyL :: Z -> Z ::> Z ::> Z ::> Ok 51foreign import ccall unsafe "multiplyL" c_multiplyL :: Z -> Z ::> Z ::> Z ::> Ok
51 52
52isT Matrix{order = ColumnMajor} = 0 53isT (rowOrder -> False) = 0
53isT Matrix{order = RowMajor} = 1 54isT _ = 1
54 55
55tt x@Matrix{order = ColumnMajor} = x 56tt x@(rowOrder -> False) = x
56tt x@Matrix{order = RowMajor} = trans x 57tt x = trans x
57 58
58multiplyAux f st a b = unsafePerformIO $ do 59multiplyAux f st a b = unsafePerformIO $ do
59 when (cols a /= rows b) $ error $ "inconsistent dimensions in matrix product "++ 60 when (cols a /= rows b) $ error $ "inconsistent dimensions in matrix product "++