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

OpenMP parallel implementation of the Reduce pattern. More...

Collaboration diagram for OpenMP parallel reduce pattern:

Functions

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

Detailed Description

OpenMP parallel implementation of the Reduce pattern.

Function Documentation

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

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

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