Table of Contents

Delegate TakeLeadingKernel

Namespace
NumSharp.Backends.Kernels
Assembly
NumSharp.dll

The fancy-index gather along a non-leading axis, in NumPy's MapIter buffer order: for every index j and outer row o, copies innerSize bytes from src[(o * maxItem + indices[j]) * innerSize] to dst[(j * outerSize + o) * innerSize].

public delegate void TakeLeadingKernel(byte* src, long* indices, long indicesCount, long outerSize, long maxItem, long innerSize, long tileRows, byte* dst)

Parameters

src byte*

The source, laid out (outerSize, maxItem, innerSize bytes) C-contiguous.

indices long*

int64 indices, each already in [0, maxItem) — not checked here.

indicesCount long

The number of indices (the leading dimension of dst).

outerSize long

The product of the source dims before the indexed axis.

maxItem long

The extent of the indexed axis in the source.

innerSize long

Bytes per slab (element bytes times the dims after the indexed axis).

tileRows long

Source rows processed per tile (at least 1); sizes the cache-resident read window.

dst byte*

The destination, (indicesCount, outerSize, innerSize bytes) C-contiguous.