Representation of reduce pattern. Represents a reduction that can be used as a stage on a pipeline.
More...
#include <reduce_pattern.h>
template<typename Combiner, typename Identity>
class grppi::reduce_t< Combiner, Identity >
Representation of reduce pattern. Represents a reduction that can be used as a stage on a pipeline.
- Template Parameters
-
Combiner | Callable type for the combine operation used in the reduction. |
Identity | Identity value for the combiner. |
template<typename Combiner, typename Identity>
Construct a reduction pattern object.
- Parameters
-
wsize | Window size. |
offset | Offset betwee window starts. |
Id | Identity value. |
combine_op | Combiner used for the reduction. |
template<typename Combiner, typename Identity>
Add an item to the reduction buffer. If there are remaining items before reaching the next window start the item is discarded.
- Parameters
-
template<typename Combiner, typename Identity>
Get the combiner.
- Returns
- The combiner held by the reduction object.
template<typename Combiner, typename Identity>
Get the offset.
- Returns
- The offset the reduction object.
template<typename Combiner, typename Identity>
template<typename T >
template<typename Combiner, typename Identity>
template<typename E >
Reduce values from a window.
- Returns
- The result of the reduction.
template<typename Combiner, typename Identity>
Check if a reduction can be performed.
template<typename Combiner, typename Identity>
Get the window size.
- Returns
- The window size of the reduction object.
The documentation for this class was generated from the following file: