Struct ElementReductionKernelKey
Cache key for element-wise (full array) reduction kernels. Reduces all elements to a single scalar value.
public readonly record struct ElementReductionKernelKey : IEquatable<ElementReductionKernelKey>
- Implements
- Inherited Members
- Extension Methods
Remarks
Supports up to 144 unique kernels: 12 types × 8 operations × 1 path
Constructors
ElementReductionKernelKey(NPTypeCode, NPTypeCode, ReductionOp, bool)
Cache key for element-wise (full array) reduction kernels. Reduces all elements to a single scalar value.
public ElementReductionKernelKey(NPTypeCode InputType, NPTypeCode AccumulatorType, ReductionOp Op, bool IsContiguous)
Parameters
InputTypeNPTypeCodeAccumulatorTypeNPTypeCodeOpReductionOpIsContiguousbool
Remarks
Supports up to 144 unique kernels: 12 types × 8 operations × 1 path
Properties
AccumulatorType
public NPTypeCode AccumulatorType { get; init; }
Property Value
InputType
public NPTypeCode InputType { get; init; }
Property Value
IsContiguous
public bool IsContiguous { get; init; }
Property Value
IsSameType
Returns true if input and accumulator types are the same.
public bool IsSameType { get; }
Property Value
Op
public ReductionOp Op { get; init; }
Property Value
ResultType
Result type depends on operation:
- ArgMax/ArgMin: always Int32
- All/Any: always Boolean
- Mean: always Double (or accumulator type if specified)
- Others: same as accumulator type
public NPTypeCode ResultType { get; }
Property Value
Methods
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.