summaryrefslogtreecommitdiff
path: root/packages/base/src/Internal/ST.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2015-06-22 20:05:56 +0200
committerAlberto Ruiz <aruiz@um.es>2015-06-22 20:05:56 +0200
commitfbff5949bba157b0da08a4b59124c7976289fb65 (patch)
treee5e0124b1a0307f29eae212449ed4ed281bafe08 /packages/base/src/Internal/ST.hs
parent8053285df72177dab6b6d86241307d743fa0025f (diff)
sliceMatrix (wip)
Diffstat (limited to 'packages/base/src/Internal/ST.hs')
-rw-r--r--packages/base/src/Internal/ST.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/base/src/Internal/ST.hs b/packages/base/src/Internal/ST.hs
index c98ff0e..92654e4 100644
--- a/packages/base/src/Internal/ST.hs
+++ b/packages/base/src/Internal/ST.hs
@@ -109,12 +109,12 @@ newVector x n = do
109 109
110{-# INLINE ioReadM #-} 110{-# INLINE ioReadM #-}
111ioReadM :: Storable t => Matrix t -> Int -> Int -> IO t 111ioReadM :: Storable t => Matrix t -> Int -> Int -> IO t
112ioReadM m r c = ioReadV (xdat m) (r * (ti $ xRow m) + c * (ti $ xCol m)) 112ioReadM m r c = ioReadV (xdat m) (r * xRow m + c * xCol m)
113 113
114 114
115{-# INLINE ioWriteM #-} 115{-# INLINE ioWriteM #-}
116ioWriteM :: Storable t => Matrix t -> Int -> Int -> t -> IO () 116ioWriteM :: Storable t => Matrix t -> Int -> Int -> t -> IO ()
117ioWriteM m r c val = ioWriteV (xdat m) (r * (ti $ xRow m) + c * (ti $ xCol m)) val 117ioWriteM m r c val = ioWriteV (xdat m) (r * xRow m + c * xCol m) val
118 118
119 119
120newtype STMatrix s t = STMatrix (Matrix t) 120newtype STMatrix s t = STMatrix (Matrix t)