Contents

struct

SushiRuntime::API::Maximum

template <typename T>

Keeps the larger of two values; identity is the lowest T.

Declared in
include/SushiRuntime/api/vocabulary/combine.hpp

Template parameters

T

Element type being reduced; must have a numeric_limits.

Public member functions

T operator()(const T &a, const T &b) const

Combines two values by keeping the larger.

Parameters

a

Left operand — the accumulator in a fold.

b

Right operand — the next element.

Returns

b when a compares less than it, else a.

Static public member functions

static constexpr T identity()

The value a maximum over no elements produces.

Returns

The lowest representable T, so any element wins against it.