GrPPI  0.3.1
Generic and Reusable Parallel Pattern Interface
Functions
Stream reduce pattern

Interface for applying the Stream reduction pattern. More...

Collaboration diagram for Stream reduce pattern:

Functions

template<typename Identity , typename Combiner >
auto grppi::reduce (int window_size, int offset, Identity identity, Combiner &&combine_op)
 Invoke Stream reduction pattern on a stream that can be composed in other streaming patterns. More...
 

Detailed Description

Interface for applying the Stream reduction pattern.

Function Documentation

template<typename Identity , typename Combiner >
auto grppi::reduce ( int  window_size,
int  offset,
Identity  identity,
Combiner &&  combine_op 
)

Invoke Stream reduction pattern on a stream that can be composed in other streaming patterns.

Template Parameters
IdentityType of the identity value used by the combiner.
CombinerCallable type used for data items combination.
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.
combine_opCombination operation.