GrPPI  0.2
Generic and Reusable Parallel Pattern Interface
Functions
TBB parallel map/reduce pattern

TBB parallel implementation of the Map/reduce pattern. More...

Collaboration diagram for TBB parallel map/reduce pattern:

Functions

template<typename InputIt , typename Transformer , typename Identity , typename Combiner >
Identity grppi::map_reduce (parallel_execution_tbb &p, InputIt first, InputIt last, Identity identity, Transformer &&transform_op, Combiner &&combine_op)
 Invoke Map/reduce pattern on a data sequence with TBB parallel execution. More...
 

Detailed Description

TBB parallel implementation of the Map/reduce pattern.

Function Documentation

template<typename InputIt , typename Transformer , typename Identity , typename Combiner >
Identity grppi::map_reduce ( parallel_execution_tbb p,
InputIt  first,
InputIt  last,
Identity  identity,
Transformer &&  transform_op,
Combiner &&  combine_op 
)

Invoke Map/reduce pattern on a data sequence with TBB parallel execution.

Template Parameters
InputItIterator type used for the input sequence.
ResultResult type of the reduction.
TransformerCallable type for the transformation operation.
CombinerCallable type for the combination operation of the reduction.
Parameters
exTBB parallel execution policy object.
firstIterator to the first element in the input sequence.
lastIterator to one past the end of the input sequence.
identityIdentity value for the combination operation.
transf_opTransformation operation.
combine_opCombination operation.
Returns
Result of the map/reduce operation.