Parallel-Arrows-Multicore-0.1.1.0: GpH based backend for @Parallel-Arrows-Definition@ in a multicore variant.

Parrows.Multicore

Synopsis

# Documentation

type Strategy a = a -> Eval a #

A Strategy is a function that embodies a parallel evaluation strategy. The function traverses (parts of) its argument, evaluating subexpressions in parallel or in sequence.

A Strategy may do an arbitrary amount of evaluation of its argument, but should not return a value different from the one it was passed.

Parallel computations may be discarded by the runtime system if the program no longer requires their result, which is why a Strategy function returns a new value equivalent to the old value. The intention is that the program applies the Strategy to a structure, and then uses the returned value, discarding the old value. This idiom is expressed by the using function.

data Conf a Source #

Constructors

 Conf (Strategy a)

Instances

 ArrowChoice arr => ArrowParallel arr a b (Conf b) Source # MethodsparEvalN :: Conf b -> [arr a b] -> arr [a] [b] # (ArrowChoice arr, ArrowParallel arr a b (Conf b)) => ArrowLoopParallel arr a b (Conf b) Source # MethodsloopParEvalN :: Conf b -> [arr a b] -> arr [a] [b] #postLoopParEvalN :: Conf b -> [arr a b] -> arr [a] [b] # Source # Methodsput :: Arrow arr => Conf a -> arr a (BasicFuture a) #get :: Arrow arr => Conf a -> arr (BasicFuture a) a #

defaultConf :: NFData b => [arr a b] -> Conf b Source #

stratToConf :: [arr a b] -> Strategy b -> Conf b Source #