#[non_exhaustive]pub enum ReduceOp {
Sum,
Product,
SumSquares,
Max,
Min,
}Expand description
Runtime reduction operation for dtype-erased full reductions.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Sum
Product
SumSquares
Sum of same-dtype rounded squares.
Each input is first multiplied by itself without FMA contraction, then
accumulated under the same association policy as Self::Sum.
Max
NaN-propagating maximum for f32/f64, ordered maximum for
i32/i64.
Any NaN operand makes the result the canonical NaN of the dtype. The
identity written for an empty reduction is -inf for floats and the
dtype minimum for integers. Complex and bool dtypes are rejected.
When the reduced values contain both -0.0 and +0.0, which zero is
returned is unspecified.
Min
NaN-propagating minimum for f32/f64, ordered minimum for
i32/i64.
Any NaN operand makes the result the canonical NaN of the dtype. The
identity written for an empty reduction is +inf for floats and the
dtype maximum for integers. Complex and bool dtypes are rejected.
When the reduced values contain both -0.0 and +0.0, which zero is
returned is unspecified.