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

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

Collaboration diagram for OpenMP parallel map/reduce pattern:

Functions

template<typename InputIt , typename Transformer , typename Result , typename Combiner >
Result grppi::map_reduce (parallel_execution_omp &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

OpenMP parallel implementation of the Map/reduce pattern.

Function Documentation

template<typename InputIt , typename Transformer , typename Result , typename Combiner >
Result grppi::map_reduce ( parallel_execution_omp 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 input sequence.
ResultResult type of the reduction.
TransformerCallable type for the transformation operation.
CombinerCallable type for the combination operation of the reduction.
Parameters
exOpenMP 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.