diff options
author | Alberto Ruiz <aruiz@um.es> | 2015-06-22 11:54:16 +0200 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2015-06-22 11:54:16 +0200 |
commit | 8053285df72177dab6b6d86241307d743fa0025f (patch) | |
tree | 582a033ef3d7e10b355d844d57b608d8f3efa753 /packages/base/src/Internal/LAPACK.hs | |
parent | bd1bca66174ec3c0feb38c531cfc611cc0239b21 (diff) |
implicit rowOrder
Diffstat (limited to 'packages/base/src/Internal/LAPACK.hs')
-rw-r--r-- | packages/base/src/Internal/LAPACK.hs | 9 |
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 | |||
49 | foreign import ccall unsafe "multiplyI" c_multiplyI :: I -> I ::> I ::> I ::> Ok | 50 | foreign import ccall unsafe "multiplyI" c_multiplyI :: I -> I ::> I ::> I ::> Ok |
50 | foreign import ccall unsafe "multiplyL" c_multiplyL :: Z -> Z ::> Z ::> Z ::> Ok | 51 | foreign import ccall unsafe "multiplyL" c_multiplyL :: Z -> Z ::> Z ::> Z ::> Ok |
51 | 52 | ||
52 | isT Matrix{order = ColumnMajor} = 0 | 53 | isT (rowOrder -> False) = 0 |
53 | isT Matrix{order = RowMajor} = 1 | 54 | isT _ = 1 |
54 | 55 | ||
55 | tt x@Matrix{order = ColumnMajor} = x | 56 | tt x@(rowOrder -> False) = x |
56 | tt x@Matrix{order = RowMajor} = trans x | 57 | tt x = trans x |
57 | 58 | ||
58 | multiplyAux f st a b = unsafePerformIO $ do | 59 | multiplyAux 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 "++ |