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

Sequential implementation of the Stream reduction pattern. More...

Collaboration diagram for Sequential stream reduce pattern:

Functions

template<typename Identity , typename Combiner , typename Consumer , typename Generator >
void grppi::stream_reduce (sequential_execution &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 sequential execution. More...
 

Detailed Description

Sequential implementation of the Stream reduction pattern.

Function Documentation

template<typename Identity , typename Combiner , typename Consumer , typename Generator >
void grppi::stream_reduce ( sequential_execution 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 sequential execution.

Template Parameters
IdentityType of the identity value used by the combiner.
GeneratorCallable type used for generating data items.
CombinerCallable type used for data items combination.
ConsumerCallable type used for consuming data items.
Parameters
exSequential 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.