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

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

Collaboration diagram for Native parallel map/reduce pattern:

Functions

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

Detailed Description

Native parallel implementation of the Map/reduce pattern.

Function Documentation

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

Invoke Map/reduce pattern on a data sequence with native 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
exNative parallel execution policy object.
firstIterator to the first element in the input sequence.
lastIterator to one past the end of the input sequence.
identityResult value for the combination operation.
transf_opTransformation operation.
combine_opCombination operation.
Returns
Result of the map/reduce operation.