summaryrefslogtreecommitdiff
path: root/packages/base/src/Internal/LAPACK.hs
diff options
context:
space:
mode:
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 "++