struct
SushiRuntime::Sum
template <typename T>Adds two values; identity is the value-initialised T.
- Declared in
include/SushiRuntime/api/vocabulary/combine.hpp
Template parameters
TElement type being reduced.
Public member functions
T operator()(const T &a, const T &b) constCombines two values by addition.
Parameters
aLeft operand — the accumulator in a fold.
bRight operand — the next element.
Returns
Their sum.
Static public member functions
static constexpr T identity()The value a sum of no elements produces.
Returns
The value-initialised T (zero for arithmetic types).

