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

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

Collaboration diagram for Native parallel stream reduce pattern:

Functions

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

Detailed Description

Native parallel implementation of the Stream reduction pattern.

Function Documentation

template<typename Identity , typename Combiner , typename Consumer , typename Generator >
void grppi::stream_reduce ( parallel_execution_native 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 native parallel 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
exNative 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.