Interface for applying the Stream reduction pattern.
More...
|
template<typename Execution , typename Identity , typename Combiner > |
auto | grppi::stream_reduce (Execution &ex, 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...
|
|
Interface for applying the Stream reduction pattern.
template<typename Execution , typename Identity , typename Combiner >
auto grppi::stream_reduce |
( |
Execution & |
ex, |
|
|
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
-
Identity | Type of the identity value used by the combiner. |
Combiner | Callable type used for data items combination. |
- Parameters
-
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. |
combine_op | Combination operation. |