packages feed

dph-prim-interface 0.6.1.1 → 0.7.0.1

raw patch · 4 files changed

+72/−16 lines, 4 filesdep ~basedep ~dph-basedep ~vectorPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base, dph-base, vector

API changes (from Hackage documentation)

+ Data.Array.Parallel.Unlifted: append_vs :: (Elt a, Elts a) => Segd -> VSegd -> Arrays a -> VSegd -> Arrays a -> Array a
+ Data.Array.Parallel.Unlifted: zipWith5 :: (Elt a, Elt b, Elt c, Elt d, Elt e, Elt f) => (a -> b -> c -> d -> e -> f) -> Array a -> Array b -> Array c -> Array d -> Array e -> Array f
+ Data.Array.Parallel.Unlifted: zipWith6 :: (Elt a, Elt b, Elt c, Elt d, Elt e, Elt f, Elt g) => (a -> b -> c -> d -> e -> f -> g) -> Array a -> Array b -> Array c -> Array d -> Array e -> Array f -> Array g
+ Data.Array.Parallel.Unlifted: zipWith7 :: (Elt a, Elt b, Elt c, Elt d, Elt e, Elt f, Elt g, Elt h) => (a -> b -> c -> d -> e -> f -> g -> h) -> Array a -> Array b -> Array c -> Array d -> Array e -> Array f -> Array g -> Array h
+ Data.Array.Parallel.Unlifted: zipWith8 :: (Elt a, Elt b, Elt c, Elt d, Elt e, Elt f, Elt g, Elt h, Elt i) => (a -> b -> c -> d -> e -> f -> g -> h -> i) -> Array a -> Array b -> Array c -> Array d -> Array e -> Array f -> Array g -> Array h -> Array i

Files

Data/Array/Parallel/Unlifted.hs view
@@ -42,6 +42,7 @@ empty                           = notImplemented "empty" (+:+)                           = notImplemented "(+:+)" append_s                        = notImplemented "append_s"+append_vs                       = notImplemented "append_vs" replicate                       = notImplemented "replicate" replicate_s                     = notImplemented "replicate_s" replicate_rs                    = notImplemented "replicate_rs"
dph-prim-interface.cabal view
@@ -1,5 +1,5 @@ Name:           dph-prim-interface-Version:        0.6.1.1+Version:        0.7.0.1 License:        BSD3 License-File:   LICENSE Author:         The DPH Team@@ -34,8 +34,8 @@         -funbox-strict-fields -fcpr-off    Build-Depends: -        base     == 4.5.*,+        base     == 4.6.*,         random   == 1.0.*,-        vector   == 0.9.*,-        dph-base == 0.6.1.*+        dph-base == 0.7.*,+        vector   == 0.10.* 
interface/DPH_Header.h view
@@ -11,7 +11,8 @@   replicate, replicate_s, replicate_rs,   repeat,   indexed,-  (+:+),     append_s,+  (+:+),+  append_s, append_vs,   indices_s,   enumFromTo,   enumFromThenTo,@@ -42,10 +43,10 @@   -- * Zipping and Unzipping   zip,   zip3,   unzip, unzip3,-  fsts,  snds,+  fsts,  snds,      -- * Map and ZipWith-  map, zipWith, zipWith3, zipWith4,+  map, zipWith, zipWith3, zipWith4, zipWith5, zipWith6, zipWith7,  zipWith8,     -- * Scans and Folds   scan,
interface/DPH_Interface.h view
@@ -27,7 +27,8 @@ {-# RULES  "map/zipWith (+)/enumFromStepLen" forall m n is.-  map (dph_mod_index m) (zipWith GHC.Base.plusInt (enumFromStepLen 0 m n) is)+  map (dph_mod_index m) (zipWith ((+) :: Int -> Int -> Int)+                                 (enumFromStepLen 0 m n) is)     = map (dph_mod_index m) is  "map dph_mod_index/enumFromStepLenEach" forall k l is n1 n2.@@ -172,7 +173,18 @@    #-} +append_vs +        :: (Elt a, Elts a)+        => Segd         -- ^ Segment descriptor of result aarray.+        -> VSegd        -- ^ Segment descriptor of first array.+        -> Arrays a     -- ^ Data of first array.+        -> VSegd        -- ^ Segment descriptor of second array.+        -> Arrays a     -- ^ Data of second array.+        -> Array a+{-# INLINE_BACKEND append_vs #-} ++ -- Indexed ---------------------------- -- | O(length result). Tag each element of an array with its index. --@@ -438,21 +450,63 @@                    (zip cs ds) {-# INLINE zipWith4 #-} +-- | Apply a worker function to corresponding elements of five arrays.+zipWith5 :: (Elt a, Elt b, Elt c, Elt d, Elt e, Elt f)+         => (a -> b -> c -> d -> e -> f)+         -> Array a -> Array b -> Array c -> Array d -> Array e -> Array f+{-# INLINE zipWith5 #-}+zipWith5 f as bs cs ds es+         = zipWith (\(a, b) ((c, d),e) -> f a b c d e)+                   (zip as bs)+                   (zip (zip cs ds) es) +-- | Apply a worker function to corresponding elements of six arrays.+zipWith6 :: (Elt a, Elt b, Elt c, Elt d, Elt e, Elt f, Elt g)+         => (a -> b -> c -> d -> e -> f ->g)+         -> Array a -> Array b -> Array c -> Array d -> Array e -> Array f -> Array g+{-# INLINE zipWith6 #-}+zipWith6 fn as bs cs ds es fs+         = zipWith (\((a, b), c) ((d, e), f) -> fn a b c d e f)+                   (zip (zip as bs) cs)+                   (zip (zip ds es) fs)++-- | Apply a worker function to corresponding elements of seven arrays.+zipWith7 :: (Elt a, Elt b, Elt c, Elt d, Elt e, Elt f, Elt g, Elt h)+         => (a -> b -> c -> d -> e -> f -> g ->h)+         -> Array a -> Array b -> Array c -> Array d -> Array e -> Array f -> Array g +         -> Array h+{-# INLINE zipWith7 #-}+zipWith7 fn as bs cs ds es fs gs+         = zipWith (\((a, b), c) ((d, e), (f, g)) -> fn a b c d e f g)+                   (zip (zip as bs) cs)+                   (zip (zip ds es) (zip fs gs))++-- | Apply a worker function to corresponding elements of six arrays.+zipWith8 :: (Elt a, Elt b, Elt c, Elt d, Elt e, Elt f, Elt g, Elt h, Elt i)+         => (a -> b -> c -> d -> e -> f -> g ->h -> i)+         -> Array a -> Array b -> Array c -> Array d -> Array e -> Array f -> Array g +         -> Array h -> Array i+{-# INLINE zipWith8 #-}+zipWith8 fn as bs cs ds es fs gs hs+         = zipWith (\((a, b), (c, d)) ((e, f), (g, h)) -> fn a b c d e f g h)+                   (zip (zip as bs) (zip cs ds))+                   (zip (zip es fs) (zip gs hs))+ {-# RULES          "zipWith/replicate" forall f m n x y.   zipWith f (replicate m x) (replicate n y) = replicate m (f x y)  "zipWith/plusInt0_1" forall n xs.-  zipWith GHC.Base.plusInt (replicate n (GHC.Base.I# 0#)) xs = xs+  zipWith (+) (replicate n (GHC.Base.I# 0#)) xs = xs  "zipWith/plusInt0_2" forall n xs.-  zipWith GHC.Base.plusInt xs (replicate n (GHC.Base.I# 0#)) = xs+  zipWith (+) xs (replicate n (GHC.Base.I# 0#)) = xs  "zipWith(plusInt)/enumFromStepLen" forall i1 k1 n1 i2 k2 n2.-  zipWith GHC.Base.plusInt (enumFromStepLen i1 k1 n1)-                           (enumFromStepLen i2 k2 n2)+  zipWith ((+) :: Int -> Int -> Int)+              (enumFromStepLen i1 k1 n1)+              (enumFromStepLen i2 k2 n2)     = enumFromStepLen (i1+i2) (k1+k2) n1   #-} @@ -665,11 +719,11 @@ "seq/sum" forall xs e.   seq (sum xs) e = seq xs e -"seq/scan<Int> (+)" forall i xs e.-  seq (scan GHC.Base.plusInt i xs) e = i `seq` xs `seq` e+"seq/scan<Int> (+)" forall (i :: Int) xs e.+  seq (scan (+) i xs) e = i `seq` xs `seq` e -"scan/replicate" forall z n x.-  scan GHC.Base.plusInt z (replicate n x)+"scan/replicate" forall (z :: Int) n x.+  scan (+) z (replicate n x)     = enumFromStepLen z x n  "sum/replicate_rs" forall n xs.