summaryrefslogtreecommitdiff
path: root/packages/sparse
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2015-01-08 13:55:57 +0100
committerAlberto Ruiz <aruiz@um.es>2015-01-08 13:55:57 +0100
commit5eba1bc309d7845366e8d00849d85426bf8f666d (patch)
treec35efda048ec3211325f984bcabe9626810d5afd /packages/sparse
parent8878aaaf649962f4360a94109a674da756ad2202 (diff)
update other pkgs to ghc-7.10
Diffstat (limited to 'packages/sparse')
-rw-r--r--packages/sparse/src/Numeric/LinearAlgebra/Sparse.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/sparse/src/Numeric/LinearAlgebra/Sparse.hs b/packages/sparse/src/Numeric/LinearAlgebra/Sparse.hs
index 8608394..d75fec2 100644
--- a/packages/sparse/src/Numeric/LinearAlgebra/Sparse.hs
+++ b/packages/sparse/src/Numeric/LinearAlgebra/Sparse.hs
@@ -13,8 +13,11 @@ import System.IO.Unsafe(unsafePerformIO)
13import Foreign(Ptr) 13import Foreign(Ptr)
14import Numeric.LinearAlgebra.HMatrix 14import Numeric.LinearAlgebra.HMatrix
15import Text.Printf 15import Text.Printf
16import Numeric.LinearAlgebra.Util((~!~)) 16import Control.Monad(when)
17 17
18(???) :: Bool -> String -> IO ()
19infixl 0 ???
20c ??? msg = when c (error msg)
18 21
19type IV t = CInt -> Ptr CInt -> t 22type IV t = CInt -> Ptr CInt -> t
20type V t = CInt -> Ptr Double -> t 23type V t = CInt -> Ptr Double -> t
@@ -22,7 +25,7 @@ type SMxV = V (IV (IV (V (V (IO CInt)))))
22 25
23dss :: CSR -> Vector Double -> Vector Double 26dss :: CSR -> Vector Double -> Vector Double
24dss CSR{..} b = unsafePerformIO $ do 27dss CSR{..} b = unsafePerformIO $ do
25 size b /= csrNRows ~!~ printf "dss: incorrect sizes: (%d,%d) x %d" csrNRows csrNCols (size b) 28 size b /= csrNRows ??? printf "dss: incorrect sizes: (%d,%d) x %d" csrNRows csrNCols (size b)
26 r <- createVector csrNCols 29 r <- createVector csrNCols
27 app5 c_dss vec csrVals vec csrCols vec csrRows vec b vec r "dss" 30 app5 c_dss vec csrVals vec csrCols vec csrRows vec b vec r "dss"
28 return r 31 return r