Table of Contents

Delegate RavelMultiIndexKernel

Namespace
NumSharp.Backends.Kernels
Assembly
NumSharp.dll

IL-emitted multi-coord→flat-index folder for np.ravel_multi_index. Caller pre-casts each coord array to contig int64 and computes ravelStrides (C or F order baked into the strides); the kernel reads coords[d][i] linearly, applies the per-axis modes clipping/wrapping, and writes the summed flat index into outIndices.

public delegate long RavelMultiIndexKernel(long** coords, long count, long* dims, long* ravelStrides, int* modes, long ndim, long* outIndices)

Parameters

coords long**
IL-emitted multi-coord→flat-index folder for np.ravel_multi_index. Caller pre-casts each coord array to contig int64 and computes ravelStrides (C or F order baked into the strides); the kernel reads coords[d][i] linearly, applies the per-axis modes clipping/wrapping, and writes the summed flat index into outIndices.
count long
IL-emitted multi-coord→flat-index folder for np.ravel_multi_index. Caller pre-casts each coord array to contig int64 and computes ravelStrides (C or F order baked into the strides); the kernel reads coords[d][i] linearly, applies the per-axis modes clipping/wrapping, and writes the summed flat index into outIndices.
dims long*
IL-emitted multi-coord→flat-index folder for np.ravel_multi_index. Caller pre-casts each coord array to contig int64 and computes ravelStrides (C or F order baked into the strides); the kernel reads coords[d][i] linearly, applies the per-axis modes clipping/wrapping, and writes the summed flat index into outIndices.
ravelStrides long*
IL-emitted multi-coord→flat-index folder for np.ravel_multi_index. Caller pre-casts each coord array to contig int64 and computes ravelStrides (C or F order baked into the strides); the kernel reads coords[d][i] linearly, applies the per-axis modes clipping/wrapping, and writes the summed flat index into outIndices.
modes int*
IL-emitted multi-coord→flat-index folder for np.ravel_multi_index. Caller pre-casts each coord array to contig int64 and computes ravelStrides (C or F order baked into the strides); the kernel reads coords[d][i] linearly, applies the per-axis modes clipping/wrapping, and writes the summed flat index into outIndices.
ndim long
IL-emitted multi-coord→flat-index folder for np.ravel_multi_index. Caller pre-casts each coord array to contig int64 and computes ravelStrides (C or F order baked into the strides); the kernel reads coords[d][i] linearly, applies the per-axis modes clipping/wrapping, and writes the summed flat index into outIndices.
outIndices long*
IL-emitted multi-coord→flat-index folder for np.ravel_multi_index. Caller pre-casts each coord array to contig int64 and computes ravelStrides (C or F order baked into the strides); the kernel reads coords[d][i] linearly, applies the per-axis modes clipping/wrapping, and writes the summed flat index into outIndices.

Returns

long

count on success. On failure (mode=raise + OOB coord), the row index of the first offending row.

Extension Methods