Table of Contents

Delegate BinaryKernel<T>

Namespace
NumSharp.Backends.Kernels
Assembly
NumSharp.dll

Unified binary operation kernel signature. All binary operations (Add, Sub, Mul, Div, Mod) use this interface. The kernel handles pattern detection and dispatch internally.

public delegate void BinaryKernel<T>(T* lhs, T* rhs, T* result, int* lhsStrides, int* rhsStrides, int* shape, int ndim, int totalSize) where T : unmanaged

Parameters

lhs T*

Pointer to left operand data

rhs T*

Pointer to right operand data

result T*

Pointer to output data

lhsStrides int*

Left operand strides (element units, not bytes)

rhsStrides int*

Right operand strides (element units, not bytes)

shape int*

Output shape dimensions

ndim int

Number of dimensions

totalSize int

Total number of output elements

Type Parameters

T

Element type (byte, short, int, long, float, double, etc.)

Extension Methods