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