diff options
author | Alberto Ruiz <aruiz@um.es> | 2015-06-22 20:05:56 +0200 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2015-06-22 20:05:56 +0200 |
commit | fbff5949bba157b0da08a4b59124c7976289fb65 (patch) | |
tree | e5e0124b1a0307f29eae212449ed4ed281bafe08 /packages/base/src/Internal/ST.hs | |
parent | 8053285df72177dab6b6d86241307d743fa0025f (diff) |
sliceMatrix (wip)
Diffstat (limited to 'packages/base/src/Internal/ST.hs')
-rw-r--r-- | packages/base/src/Internal/ST.hs | 4 |
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 #-} |
111 | ioReadM :: Storable t => Matrix t -> Int -> Int -> IO t | 111 | ioReadM :: Storable t => Matrix t -> Int -> Int -> IO t |
112 | ioReadM m r c = ioReadV (xdat m) (r * (ti $ xRow m) + c * (ti $ xCol m)) | 112 | ioReadM m r c = ioReadV (xdat m) (r * xRow m + c * xCol m) |
113 | 113 | ||
114 | 114 | ||
115 | {-# INLINE ioWriteM #-} | 115 | {-# INLINE ioWriteM #-} |
116 | ioWriteM :: Storable t => Matrix t -> Int -> Int -> t -> IO () | 116 | ioWriteM :: Storable t => Matrix t -> Int -> Int -> t -> IO () |
117 | ioWriteM m r c val = ioWriteV (xdat m) (r * (ti $ xRow m) + c * (ti $ xCol m)) val | 117 | ioWriteM m r c val = ioWriteV (xdat m) (r * xRow m + c * xCol m) val |
118 | 118 | ||
119 | 119 | ||
120 | newtype STMatrix s t = STMatrix (Matrix t) | 120 | newtype STMatrix s t = STMatrix (Matrix t) |