Table of Contents

Delegate TakeAlongAxisKernel

Namespace
NumSharp.Backends.Kernels
Assembly
NumSharp.dll

IL-emitted per-element gather kernel for np.take_along_axis. Walks the C-contiguous result with an incremental strided odometer, reading one int64 index and gathering one elemBytes-wide element of the source per step.

public delegate long TakeAlongAxisKernel(byte* arrBase, long* arrStrides, long axisStrideBytes, long axisLen, long* idxBase, long* idxStrides, byte* dstBase, long* shape, long ndim, long totalSize, long* outBadIdx)

Parameters

arrBase byte*
IL-emitted per-element gather kernel for np.take_along_axis. Walks the C-contiguous result with an incremental strided odometer, reading one int64 index and gathering one elemBytes-wide element of the source per step.
arrStrides long*
IL-emitted per-element gather kernel for np.take_along_axis. Walks the C-contiguous result with an incremental strided odometer, reading one int64 index and gathering one elemBytes-wide element of the source per step.
axisStrideBytes long
IL-emitted per-element gather kernel for np.take_along_axis. Walks the C-contiguous result with an incremental strided odometer, reading one int64 index and gathering one elemBytes-wide element of the source per step.
axisLen long
IL-emitted per-element gather kernel for np.take_along_axis. Walks the C-contiguous result with an incremental strided odometer, reading one int64 index and gathering one elemBytes-wide element of the source per step.
idxBase long*
IL-emitted per-element gather kernel for np.take_along_axis. Walks the C-contiguous result with an incremental strided odometer, reading one int64 index and gathering one elemBytes-wide element of the source per step.
idxStrides long*
IL-emitted per-element gather kernel for np.take_along_axis. Walks the C-contiguous result with an incremental strided odometer, reading one int64 index and gathering one elemBytes-wide element of the source per step.
dstBase byte*
IL-emitted per-element gather kernel for np.take_along_axis. Walks the C-contiguous result with an incremental strided odometer, reading one int64 index and gathering one elemBytes-wide element of the source per step.
shape long*
IL-emitted per-element gather kernel for np.take_along_axis. Walks the C-contiguous result with an incremental strided odometer, reading one int64 index and gathering one elemBytes-wide element of the source per step.
ndim long
IL-emitted per-element gather kernel for np.take_along_axis. Walks the C-contiguous result with an incremental strided odometer, reading one int64 index and gathering one elemBytes-wide element of the source per step.
totalSize long
IL-emitted per-element gather kernel for np.take_along_axis. Walks the C-contiguous result with an incremental strided odometer, reading one int64 index and gathering one elemBytes-wide element of the source per step.
outBadIdx long*
IL-emitted per-element gather kernel for np.take_along_axis. Walks the C-contiguous result with an incremental strided odometer, reading one int64 index and gathering one elemBytes-wide element of the source per step.

Returns

long

totalSize on success. On RAISE out-of-bounds the returned value is the flat position of the first failing element and *outBadIdx holds its original (pre-wrap) index value for the caller's diagnostic.