summaryrefslogtreecommitdiff
path: root/lib/Data/Packed/Internal
diff options
context:
space:
mode:
authorVivian McPhail <haskell.vivian.mcphail@gmail.com>2010-09-21 02:56:15 +0000
committerVivian McPhail <haskell.vivian.mcphail@gmail.com>2010-09-21 02:56:15 +0000
commit44d228ad83e876d45d1511761d7cd61bb2cd5c79 (patch)
tree974020d2bbf1b6da1d761dda3bc1d65f5a78ab58 /lib/Data/Packed/Internal
parent05908719a7323110ba1955038d8341a8b7483351 (diff)
add MatrixBoot so ctrans, diag, ident in Numeri
Diffstat (limited to 'lib/Data/Packed/Internal')
-rw-r--r--lib/Data/Packed/Internal/Matrix.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Data/Packed/Internal/Matrix.hs b/lib/Data/Packed/Internal/Matrix.hs
index 94b56cf..f3bab76 100644
--- a/lib/Data/Packed/Internal/Matrix.hs
+++ b/lib/Data/Packed/Internal/Matrix.hs
@@ -246,6 +246,8 @@ compat m1 m2 = rows m1 == rows m2 && cols m1 == cols m2
246------------------------------------------------------------------ 246------------------------------------------------------------------
247 247
248-- | Supported element types for basic matrix operations. 248-- | Supported element types for basic matrix operations.
249-- provides unoptimised defaults for all (Storable a) instances
250-- @instance Element Foo where@
249class (Storable a) => Element a where 251class (Storable a) => Element a where
250 subMatrixD :: (Int,Int) -- ^ (r0,c0) starting position 252 subMatrixD :: (Int,Int) -- ^ (r0,c0) starting position
251 -> (Int,Int) -- ^ (rt,ct) dimensions of submatrix 253 -> (Int,Int) -- ^ (rt,ct) dimensions of submatrix
@@ -329,7 +331,7 @@ transdataP c1 d c2 =
329 v <- createVector (dim d) 331 v <- createVector (dim d)
330 unsafeWith d $ \pd -> 332 unsafeWith d $ \pd ->
331 unsafeWith v $ \pv -> 333 unsafeWith v $ \pv ->
332 ctransP (fi r1) (fi c1) (castPtr pd) (fi sz) (fi r2) (fi c2) (castPtr pv) (fi sz) // check "transdataStorable" 334 ctransP (fi r1) (fi c1) (castPtr pd) (fi sz) (fi r2) (fi c2) (castPtr pv) (fi sz) // check "transdataP"
333 return v 335 return v
334 where r1 = dim d `div` c1 336 where r1 = dim d `div` c1
335 r2 = dim d `div` c2 337 r2 = dim d `div` c2