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

Sequential implementation of the Reduce pattern. More...

Collaboration diagram for Sequential reduce pattern:

Functions

template<typename InputIt , typename Identity , typename Combiner >
auto grppi::reduce (sequential_execution &ex, InputIt first, InputIt last, Identity identity, Combiner &&combine_op)
 Invoke Reduce pattern with identity value on a data sequence with sequential execution. More...
 

Detailed Description

Sequential implementation of the Reduce pattern.

Function Documentation

template<typename InputIt , typename Identity , typename Combiner >
auto grppi::reduce ( sequential_execution ex,
InputIt  first,
InputIt  last,
Identity  identity,
Combiner &&  combine_op 
)

Invoke Reduce pattern with identity value on a data sequence with sequential execution.

Template Parameters
InputItIterator type used for input sequence.
IdentityType for the identity value.
CombinerCallable type for the combiner operation.
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 combiner operation.
combiner_opCombiner operation for the reduction.