Table of Contents

Delegate PiecewiseScalarKernel

Namespace
NumSharp.Backends.Kernels
Assembly
NumSharp.dll

Fused np.piecewise (scalar-funclist) kernel. conds is n boolean base pointers (the real conditions), funcVals is n + 1 scalar values of the result dtype (funcVals[0..n-1] the per-condition scalars, funcVals[n] the seed — the default, or 0), and result is C-contiguous of count elements. result[i] is funcVals[k] for the LARGEST k in [0,n) whose cond is true, else the seed.

public delegate void PiecewiseScalarKernel(bool** conds, void* funcVals, void* result, long count)

Parameters

conds bool**
Fused np.piecewise (scalar-funclist) kernel. conds is n boolean base pointers (the real conditions), funcVals is n + 1 scalar values of the result dtype (funcVals[0..n-1] the per-condition scalars, funcVals[n] the seed — the default, or 0), and result is C-contiguous of count elements. result[i] is funcVals[k] for the LARGEST k in [0,n) whose cond is true, else the seed.
funcVals void*
Fused np.piecewise (scalar-funclist) kernel. conds is n boolean base pointers (the real conditions), funcVals is n + 1 scalar values of the result dtype (funcVals[0..n-1] the per-condition scalars, funcVals[n] the seed — the default, or 0), and result is C-contiguous of count elements. result[i] is funcVals[k] for the LARGEST k in [0,n) whose cond is true, else the seed.
result void*
Fused np.piecewise (scalar-funclist) kernel. conds is n boolean base pointers (the real conditions), funcVals is n + 1 scalar values of the result dtype (funcVals[0..n-1] the per-condition scalars, funcVals[n] the seed — the default, or 0), and result is C-contiguous of count elements. result[i] is funcVals[k] for the LARGEST k in [0,n) whose cond is true, else the seed.
count long
Fused np.piecewise (scalar-funclist) kernel. conds is n boolean base pointers (the real conditions), funcVals is n + 1 scalar values of the result dtype (funcVals[0..n-1] the per-condition scalars, funcVals[n] the seed — the default, or 0), and result is C-contiguous of count elements. result[i] is funcVals[k] for the LARGEST k in [0,n) whose cond is true, else the seed.