Table of Contents

Struct HalfMaxKernel

Namespace
NumSharp.Backends.Iteration
Assembly
NumSharp.dll

Half max. Contiguous chunks (stride == 2) run a 4-accumulator unroll that breaks the per-element dependency chain (~1.3× the scalar fold); other strides take the scalar branch. NaN propagates: the kernel aborts the moment a NaN is seen and only flags it (SawNaN).

public readonly struct HalfMaxKernel : INDReducingInnerLoop<HalfMinMaxAccumulator>
Implements
Inherited Members

Remarks

VALUE-only: it decides neither WHICH NaN nor which ±0 a NumPy reduction returns, so the engine's float16 np.max / np.min no longer use it — they run NumPyHalfMinMaxReduce, NumPy's sequential HALF loop bit for bit (Default.Reduction.MinMax.Half.cs). Kept for callers of this public kernel.

Methods

Execute(void**, long*, long, ref HalfMinMaxAccumulator)

public bool Execute(void** dataptrs, long* strides, long count, ref HalfMinMaxAccumulator a)

Parameters

dataptrs void**
strides long*
count long
a HalfMinMaxAccumulator

Returns

bool