GrPPI
0.2
Generic and Reusable Parallel Pattern Interface
|
Sequential implementation of the Stream reduction pattern. More...
Functions | |
template<typename Identity , typename Combiner , typename Consumer , typename Generator > | |
void | grppi::stream_reduce (sequential_execution &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 sequential execution. More... | |
Sequential implementation of the Stream reduction pattern.
void grppi::stream_reduce | ( | sequential_execution & | 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 sequential 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 | Sequential 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. |