diff options
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 "++ |