Table of Contents

Delegate DirectILKernelGenerator.HistogramSearchCountKernel

Namespace
NumSharp.Backends.Kernels
Assembly
NumSharp.dll

Fused non-uniform histogram count kernel: for each sample, binary-search its bin among arbitrary (monotonic) edges and increment the count — replacing a whole-array searchsorted + comparison

  • astype + bincount chain (5 passes and several full-size temps) with ONE pass.
public delegate void DirectILKernelGenerator.HistogramSearchCountKernel(void* samples, long count, void* edges, int nbins, long* counts)

Parameters

samples void*

Contiguous samples in the compare dtype C.

count long

Number of samples.

edges void*

Contiguous nbins+1 monotonic edges in the compare dtype C.

nbins int

Number of bins (edges.Length - 1).

counts long*

Output int64 count buffer of length nbins (pre-zeroed).