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

Sequential implementation of the Map/reduce pattern. More...

Collaboration diagram for Sequential map/reduce pattern:

Functions

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

Detailed Description

Sequential implementation of the Map/reduce pattern.

Function Documentation

template<typename InputIt , typename Result , typename Transformer , typename Combiner >
Result grppi::map_reduce ( sequential_execution ,
InputIt  first,
InputIt  last,
Result  identity,
Transformer &&  transform_op,
Combiner &&  combine_op 
)

Invoke Map/reduce pattern on a data sequence with sequential 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
exSequential 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.