diff options
Diffstat (limited to 'lib/Data/Packed/Internal/Vector.hs')
-rw-r--r-- | lib/Data/Packed/Internal/Vector.hs | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/Data/Packed/Internal/Vector.hs b/lib/Data/Packed/Internal/Vector.hs index 70bbae2..b68d16a 100644 --- a/lib/Data/Packed/Internal/Vector.hs +++ b/lib/Data/Packed/Internal/Vector.hs | |||
@@ -22,7 +22,7 @@ module Data.Packed.Internal.Vector ( | |||
22 | foldVector, foldVectorG, foldLoop, foldVectorWithIndex, | 22 | foldVector, foldVectorG, foldLoop, foldVectorWithIndex, |
23 | createVector, vec, | 23 | createVector, vec, |
24 | asComplex, asReal, float2DoubleV, double2FloatV, | 24 | asComplex, asReal, float2DoubleV, double2FloatV, |
25 | stepF, stepD, | 25 | stepF, stepD, condF, condD, |
26 | fwriteVector, freadVector, fprintfVector, fscanfVector, | 26 | fwriteVector, freadVector, fprintfVector, fscanfVector, |
27 | cloneVector, | 27 | cloneVector, |
28 | unsafeToForeignPtr, | 28 | unsafeToForeignPtr, |
@@ -310,6 +310,23 @@ stepD v = unsafePerformIO $ do | |||
310 | foreign import ccall "stepF" c_stepF :: TFF | 310 | foreign import ccall "stepF" c_stepF :: TFF |
311 | foreign import ccall "stepD" c_stepD :: TVV | 311 | foreign import ccall "stepD" c_stepD :: TVV |
312 | 312 | ||
313 | --------------------------------------------------------------- | ||
314 | |||
315 | condF :: Vector Float -> Vector Float -> Vector Float -> Vector Float -> Vector Float -> Vector Float | ||
316 | condF x y l e g = unsafePerformIO $ do | ||
317 | r <- createVector (dim x) | ||
318 | app6 c_condF vec x vec y vec l vec e vec g vec r "condF" | ||
319 | return r | ||
320 | |||
321 | condD :: Vector Double -> Vector Double -> Vector Double -> Vector Double -> Vector Double -> Vector Double | ||
322 | condD x y l e g = unsafePerformIO $ do | ||
323 | r <- createVector (dim x) | ||
324 | app6 c_condD vec x vec y vec l vec e vec g vec r "condD" | ||
325 | return r | ||
326 | |||
327 | foreign import ccall "condF" c_condF :: CInt -> PF -> CInt -> PF -> CInt -> PF -> TFFF | ||
328 | foreign import ccall "condD" c_condD :: CInt -> PD -> CInt -> PD -> CInt -> PD -> TVVV | ||
329 | |||
313 | ---------------------------------------------------------------- | 330 | ---------------------------------------------------------------- |
314 | 331 | ||
315 | cloneVector :: Storable t => Vector t -> IO (Vector t) | 332 | cloneVector :: Storable t => Vector t -> IO (Vector t) |