summaryrefslogtreecommitdiff
path: root/lib/Data/Packed
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2010-12-30 18:07:39 +0000
committerAlberto Ruiz <aruiz@um.es>2010-12-30 18:07:39 +0000
commite503945c666dc28f1a806ba1a2deaa587a836200 (patch)
treef3971d4a8c9f4eaa4c508d8ffc6698fd31b6a8f6 /lib/Data/Packed
parent853b46c522fa48a2c476fbfd0771a0da7aa9efc0 (diff)
cond
Diffstat (limited to 'lib/Data/Packed')
-rw-r--r--lib/Data/Packed/Internal/Vector.hs19
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
310foreign import ccall "stepF" c_stepF :: TFF 310foreign import ccall "stepF" c_stepF :: TFF
311foreign import ccall "stepD" c_stepD :: TVV 311foreign import ccall "stepD" c_stepD :: TVV
312 312
313---------------------------------------------------------------
314
315condF :: Vector Float -> Vector Float -> Vector Float -> Vector Float -> Vector Float -> Vector Float
316condF 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
321condD :: Vector Double -> Vector Double -> Vector Double -> Vector Double -> Vector Double -> Vector Double
322condD 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
327foreign import ccall "condF" c_condF :: CInt -> PF -> CInt -> PF -> CInt -> PF -> TFFF
328foreign import ccall "condD" c_condD :: CInt -> PD -> CInt -> PD -> CInt -> PD -> TVVV
329
313---------------------------------------------------------------- 330----------------------------------------------------------------
314 331
315cloneVector :: Storable t => Vector t -> IO (Vector t) 332cloneVector :: Storable t => Vector t -> IO (Vector t)