Table of Contents

Delegate ElementReductionKernel

Namespace
NumSharp.Backends.Kernels
Assembly
NumSharp.dll

Delegate for element-wise reduction kernels. Reduces all elements of an array to a single value.

public delegate object ElementReductionKernel(void* input, int* strides, int* shape, int ndim, int totalSize)

Parameters

input void*

Pointer to input data

strides int*

Input strides (element units, not bytes)

shape int*

Input shape dimensions

ndim int

Number of dimensions

totalSize int

Total 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.