GrPPI
0.2
Generic and Reusable Parallel Pattern Interface
|
Polymorphic parallel implementation of the Stream reduction pattern. More...
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... | |
Polymorphic parallel implementation of the Stream reduction pattern.
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.
Identity | Type of the identity value used by the combiner. |
Generator | Callable type used for generating data items. |
Combiner | Callable type used for data items combination. |
Consumer | Callable type used for consuming data items. |
ex | Polymorphic parallel execution policy object. |
window_size | Number of consecutive items to be reduced. |
offset | Number of items after of which a new reduction is started. |
identity | Identity value for the combination. |
generate_op | Generation operation. |
combine_op | Combination operation. |
consume_op | Consume operation. |