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

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

Collaboration diagram for Polymorphic map/reduce pattern:

Functions

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

Detailed Description

Polymorphic implementation of the Map/reduce pattern.

Function Documentation

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

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