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

OpenMP parallel implementation of the Stream reduction pattern. More...

Collaboration diagram for OpenMP parallel stream reduce pattern:

Functions

template<typename Identity , typename Combiner , typename Consumer , typename Generator >
void grppi::stream_reduce (parallel_execution_omp &ex, int window_size, int offset, Identity identity, Generator &&generate_op, Combiner &&combine_op, Consumer &&consume_op)
 Invoke Stream reduction pattern on a stream with OpenMP parallel execution. More...
 

Detailed Description

OpenMP parallel implementation of the Stream reduction pattern.

Function Documentation

template<typename Identity , typename Combiner , typename Consumer , typename Generator >
void grppi::stream_reduce ( parallel_execution_omp ex,
int  window_size,
int  offset,
Identity  identity,
Generator &&  generate_op,
Combiner &&  combine_op,
Consumer &&  consume_op 
)

Invoke Stream reduction pattern on a stream with OpenMP parallel execution.

Template Parameters
GeneratorCallable type used for generating data items.
CombinerCallable type used for data items combination.
ConsumerCallable type used for consuming data items.
IdentityType of the identity value used by the combiner.
Parameters
exOpenMP parallel execution policy object.
window_sizeNumber of consecutive items to be reduced.
offsetNumber of items after of which a new reduction is started.
identityIdentity value for the combination.
generate_opGeneration operation.
combine_opCombination operation.
consume_opConsume operation.