DPutils-0.1.1.0: utilities for DP
Safe HaskellNone
LanguageHaskell2010

Pipes.Parallel

Description

Pipes that introduce parallelism on different levels.

Synopsis

Documentation

pipePar Source #

Arguments

:: Monad m 
=> Int

number of elements to evaluate in parallel

-> Strategy b

with which strategy

-> (a -> b)

function to be mapped in parallel

-> Pipe a b m () 

Evaluates chunks of pipes elements in parallel with a pure function.

pipeParBA Source #

Arguments

:: Monad m 
=> Int

number of elements to evaluate in parallel

-> Strategy b

with which strategy

-> (a -> b)

pure function to run in parallel

-> ([a] -> m (x, [a]))

function to run before

-> (x -> [b] -> m [b])

function to run after

-> Pipe a b m () 

Evaluates chunks of pipes elements in parallel with a pure function. Before and after each parallel step, a monadic function is run. This allows generation of certain statistics or information during runs.