| Haskell Hierarchical Libraries (base package) | Contents | Index
Control.Parallel.Strategies |
Portability | non-portable
Stability | experimental
Maintainer | libraries@haskell.org
Description
Parallel strategy combinators
Synopsis
type Done = ()
type Strategy a = a -> Done
(>|) :: Done -> Done -> Done
(>||) :: Done -> Done -> Done
using :: a -> Strategy a -> a
demanding :: a -> Done -> a
sparking :: a -> Done -> a
sPar :: a -> Strategy b
sSeq :: a -> Strategy b
r0 :: Strategy a
rwhnf :: Strategy a
class NFData a where
rnf :: Strategy a
class (NFData a, Integral a) => NFDataIntegral a
class (NFData a, Ord a) => NFDataOrd a
($|) :: (a -> b) -> Strategy a -> a -> b
($||) :: (a -> b) -> Strategy a -> a -> b
(.|) :: (b -> c) -> Strategy b -> (a -> b) -> a -> c
(.||) :: (b -> c) -> Strategy b -> (a -> b) -> a -> c
(-|) :: (a -> b) -> Strategy b -> (b -> c) -> a -> c
(-||) :: (a -> b) -> Strategy b -> (b -> c) -> a -> c
seqPair :: Strategy a -> Strategy b -> Strategy (a, b)
parPair :: Strategy a -> Strategy b -> Strategy (a, b)
seqTriple :: Strategy a -> Strategy b -> Strategy c -> Strategy (a, b, c)
parTriple :: Strategy a -> Strategy b -> Strategy c -> Strategy (a, b, c)
parList :: Strategy a -> Strategy [a]
parListN :: Integral b => b -> Strategy a -> Strategy [a]
parListNth :: Int -> Strategy a -> Strategy [a]
parListChunk :: Int -> Strategy a -> Strategy [a]
parMap :: Strategy b -> (a -> b) -> [a] -> [b]
parFlatMap :: Strategy [b] -> (a -> [b]) -> [a] -> [b]
parZipWith :: Strategy c -> (a -> b -> c) -> [a] -> [b] -> [c]
seqList :: Strategy a -> Strategy [a]
seqListN :: Integral a => a -> Strategy b -> Strategy [b]
seqListNth :: Int -> Strategy b -> Strategy [b]
parBuffer :: Int -> Strategy a -> [a] -> [a]
seqArr :: Ix b => Strategy a -> Strategy (Array b a)
parArr :: Ix b => Strategy a -> Strategy (Array b a)
data Assoc a b = (:=) a b
fstPairFstList :: NFData a => Strategy [(a, b)]
force :: NFData a => a -> a
sforce :: NFData a => a -> b -> b
Documentation
type Done = ()
type Strategy a = a -> Done
(>|) :: Done -> Done -> Done
(>||) :: Done -> Done -> Done
using :: a -> Strategy a -> a
demanding :: a -> Done -> a
sparking :: a -> Done -> a
sPar :: a -> Strategy b
sSeq :: a -> Strategy b
r0 :: Strategy a
rwhnf :: Strategy a
class NFData a where
Methods
rnf :: Strategy a
Instances
NFData Bool
NFData Char
NFData Double
NFData Float
NFData Int
NFData Integer
NFData ()
(NFData a, NFData b) => NFData (a, b)
(NFData a, NFData b, NFData c) => NFData (a, b, c)
(NFData a, NFData b, NFData c, NFData d) => NFData (a, b, c, d)
(NFData a1, NFData a2, NFData a3, NFData a4, NFData a5) => NFData (a1, a2, a3, a4, a5)
(NFData a1, NFData a2, NFData a3, NFData a4, NFData a5, NFData a6) => NFData (a1, a2, a3, a4, a5, a6)
(NFData a1, NFData a2, NFData a3, NFData a4, NFData a5, NFData a6, NFData a7) => NFData (a1, a2, a3, a4, a5, a6, a7)
(NFData a1, NFData a2, NFData a3, NFData a4, NFData a5, NFData a6, NFData a7, NFData a8) => NFData (a1, a2, a3, a4, a5, a6, a7, a8)
(NFData a1, NFData a2, NFData a3, NFData a4, NFData a5, NFData a6, NFData a7, NFData a8, NFData a9) => NFData (a1, a2, a3, a4, a5, a6, a7, a8, a9)
(RealFloat a, NFData a) => NFData (Complex a)
(Integral a, NFData a) => NFData (Ratio a)
NFData a => NFData [a]
(Ix a, NFData a, NFData b) => NFData (Array a b)
(NFData a, NFData b) => NFData (Assoc a b)
class (NFData a, Integral a) => NFDataIntegral a
Instances
NFDataIntegral Int
class (NFData a, Ord a) => NFDataOrd a
Instances
NFDataOrd Int
($|) :: (a -> b) -> Strategy a -> a -> b
($||) :: (a -> b) -> Strategy a -> a -> b
(.|) :: (b -> c) -> Strategy b -> (a -> b) -> a -> c
(.||) :: (b -> c) -> Strategy b -> (a -> b) -> a -> c
(-|) :: (a -> b) -> Strategy b -> (b -> c) -> a -> c
(-||) :: (a -> b) -> Strategy b -> (b -> c) -> a -> c
seqPair :: Strategy a -> Strategy b -> Strategy (a, b)
parPair :: Strategy a -> Strategy b -> Strategy (a, b)
seqTriple :: Strategy a -> Strategy b -> Strategy c -> Strategy (a, b, c)
parTriple :: Strategy a -> Strategy b -> Strategy c -> Strategy (a, b, c)
parList :: Strategy a -> Strategy [a]
Applies a strategy to every element of a list in parallel
parListN :: Integral b => b -> Strategy a -> Strategy [a]
Applies a strategy to the first n elements of a list in parallel
parListNth :: Int -> Strategy a -> Strategy [a]
Evaluates N elements of the spine of the argument list and applies the given strategy to the Nth element (if there is one) in parallel with the result. e.g. parListNth 2 [e1, e2, e3] evaluates e2
parListChunk :: Int -> Strategy a -> Strategy [a]
`parListChunk` sequentially applies a strategy to chunks (sub-sequences) of a list in parallel. Useful to increase grain size
parMap :: Strategy b -> (a -> b) -> [a] -> [b]
`parMap` applies a function to each element of the argument list in parallel. The result of the function is evaluated using the given strategy.
parFlatMap :: Strategy [b] -> (a -> [b]) -> [a] -> [b]
`parFlatMap` uses `parMap` to apply a list-valued function to each element of the argument list in parallel. The result of the function is evaluated using the given strategy.
parZipWith :: Strategy c -> (a -> b -> c) -> [a] -> [b] -> [c]
`parZipWith` zips together two lists with a function z in parallel
seqList :: Strategy a -> Strategy [a]
Sequentially applies a strategy to each element of a list
seqListN :: Integral a => a -> Strategy b -> Strategy [b]
Sequentially applies a strategy to the first n elements of a list
seqListNth :: Int -> Strategy b -> Strategy [b]
`seqListNth` applies a strategy to the Nth element of it's argument (if there is one) before returning the result. e.g. seqListNth 2 [e1, e2, e3] evaluates e2
parBuffer :: Int -> Strategy a -> [a] -> [a]
Parallel n-buffer function added for the revised version of the strategies paper. `parBuffer` supersedes the older `fringeList`. It has the same semantics.
seqArr :: Ix b => Strategy a -> Strategy (Array b a)
Apply a strategy to all elements of an array in parallel. This can be done either in sequentially or in parallel (same as with lists, really).
parArr :: Ix b => Strategy a -> Strategy (Array b a)
data Assoc a b
Constructors
(:=) a b |
Instances
(NFData a, NFData b) => NFData (Assoc a b)
fstPairFstList :: NFData a => Strategy [(a, b)]
force :: NFData a => a -> a
sforce :: NFData a => a -> b -> b
Produced by Haddock version 0.7