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

Interface for applying the md_stream-reduce. 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 md_stream-reduce on a stream that can be composed in other streaming patterns. More...
 

Detailed Description

Interface for applying the md_stream-reduce.

Function Documentation

◆ reduce()

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

Invoke md_stream-reduce 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.