Table of Contents

Delegate ChooseFlatKernel

Namespace
NumSharp.Backends.Kernels
Assembly
NumSharp.dll

Flat np.choose kernel: every operand is C-contiguous at the result shape, so element flat is at choiceBases[mi] + flatelem and ((long)idxBase)[flat].

public delegate long ChooseFlatKernel(byte** choiceBases, byte* idxBase, byte* dstBase, long totalSize, long nChoices)

Parameters

choiceBases byte**
Flat np.choose kernel: every operand is C-contiguous at the result shape, so element flat is at choiceBases[mi] + flatelem and ((long)idxBase)[flat].
idxBase byte*
Flat np.choose kernel: every operand is C-contiguous at the result shape, so element flat is at choiceBases[mi] + flatelem and ((long)idxBase)[flat].
dstBase byte*
Flat np.choose kernel: every operand is C-contiguous at the result shape, so element flat is at choiceBases[mi] + flatelem and ((long)idxBase)[flat].
totalSize long
Flat np.choose kernel: every operand is C-contiguous at the result shape, so element flat is at choiceBases[mi] + flatelem and ((long)idxBase)[flat].
nChoices long
Flat np.choose kernel: every operand is C-contiguous at the result shape, so element flat is at choiceBases[mi] + flatelem and ((long)idxBase)[flat].

Returns

long

totalSize on success, or the flat position of the first out-of-bounds index (raise mode only; clip/wrap kernels always return totalSize).