Delegate ElementReductionKernel
Delegate for element-wise reduction kernels. Reduces all elements of an array to a single value.
public delegate object ElementReductionKernel(void* input, long* strides, long* shape, int ndim, long totalSize)
Parameters
inputvoid*Pointer to input data
strideslong*Input strides (element units, not bytes)
shapelong*Input shape dimensions
ndimintNumber of dimensions
totalSizelongTotal number of elements
Returns
- object
The reduced value (boxed)
- Extension Methods
Remarks
Returns object to handle different accumulator types without generic delegates. The caller unboxes based on the kernel key's AccumulatorType. For ArgMax/ArgMin, returns the index as int.