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

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

Collaboration diagram for Polymorphic parallel stream reduce pattern:

Functions

template<typename Identity , typename Generator , typename Combiner , typename Consumer >
void grppi::stream_reduce (polymorphic_execution &ex, int windowsize, int offset, Identity identity, Generator &&gen, Combiner &&comb, Consumer &&cons)
 Invoke Stream reduction pattern on a stream with polymorphic parallel execution. More...
 

Detailed Description

Polymorphic parallel implementation of the Stream reduction pattern.

Function Documentation

template<typename Identity , typename Generator , typename Combiner , typename Consumer >
void grppi::stream_reduce ( polymorphic_execution ex,
int  windowsize,
int  offset,
Identity  identity,
Generator &&  gen,
Combiner &&  comb,
Consumer &&  cons 
)

Invoke Stream reduction pattern on a stream with polymorphic 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
exPolymorphic 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.