Table of Contents

Delegate PutAlongAxisValidateKernel

Namespace
NumSharp.Backends.Kernels
Assembly
NumSharp.dll

IL-emitted index-validation pass for np.put_along_axis. Walks the iteration odometer, applies the advanced-index negative wrap, and bounds-checks each int64 index against the axis length — WITHOUT writing anything, so a caller can guarantee NumPy's all-or-nothing assignment (a single out-of-range index leaves the destination untouched). Dtype-agnostic (indices are always int64), hence a single cached instance.

public delegate long PutAlongAxisValidateKernel(long* idxBase, long* idxStrides, long axisLen, long* shape, long ndim, long totalSize, long* outBadIdx)

Parameters

idxBase long*
IL-emitted index-validation pass for np.put_along_axis. Walks the iteration odometer, applies the advanced-index negative wrap, and bounds-checks each int64 index against the axis length — WITHOUT writing anything, so a caller can guarantee NumPy's all-or-nothing assignment (a single out-of-range index leaves the destination untouched). Dtype-agnostic (indices are always int64), hence a single cached instance.
idxStrides long*
IL-emitted index-validation pass for np.put_along_axis. Walks the iteration odometer, applies the advanced-index negative wrap, and bounds-checks each int64 index against the axis length — WITHOUT writing anything, so a caller can guarantee NumPy's all-or-nothing assignment (a single out-of-range index leaves the destination untouched). Dtype-agnostic (indices are always int64), hence a single cached instance.
axisLen long
IL-emitted index-validation pass for np.put_along_axis. Walks the iteration odometer, applies the advanced-index negative wrap, and bounds-checks each int64 index against the axis length — WITHOUT writing anything, so a caller can guarantee NumPy's all-or-nothing assignment (a single out-of-range index leaves the destination untouched). Dtype-agnostic (indices are always int64), hence a single cached instance.
shape long*
IL-emitted index-validation pass for np.put_along_axis. Walks the iteration odometer, applies the advanced-index negative wrap, and bounds-checks each int64 index against the axis length — WITHOUT writing anything, so a caller can guarantee NumPy's all-or-nothing assignment (a single out-of-range index leaves the destination untouched). Dtype-agnostic (indices are always int64), hence a single cached instance.
ndim long
IL-emitted index-validation pass for np.put_along_axis. Walks the iteration odometer, applies the advanced-index negative wrap, and bounds-checks each int64 index against the axis length — WITHOUT writing anything, so a caller can guarantee NumPy's all-or-nothing assignment (a single out-of-range index leaves the destination untouched). Dtype-agnostic (indices are always int64), hence a single cached instance.
totalSize long
IL-emitted index-validation pass for np.put_along_axis. Walks the iteration odometer, applies the advanced-index negative wrap, and bounds-checks each int64 index against the axis length — WITHOUT writing anything, so a caller can guarantee NumPy's all-or-nothing assignment (a single out-of-range index leaves the destination untouched). Dtype-agnostic (indices are always int64), hence a single cached instance.
outBadIdx long*
IL-emitted index-validation pass for np.put_along_axis. Walks the iteration odometer, applies the advanced-index negative wrap, and bounds-checks each int64 index against the axis length — WITHOUT writing anything, so a caller can guarantee NumPy's all-or-nothing assignment (a single out-of-range index leaves the destination untouched). Dtype-agnostic (indices are always int64), hence a single cached instance.

Returns

long

totalSize when every index is in range; otherwise the flat position of the first out-of-bounds element, with *outBadIdx set to that index's original (pre-wrap) value for the caller's diagnostic.