Table of Contents

Delegate DirectILKernelGenerator.HistogramSearchIndexKernel

Namespace
NumSharp.Backends.Kernels
Assembly
NumSharp.dll

Fused per-dimension bin-index kernel for histogramdd: for each sample writes searchsorted(edges, x, 'right') with a value on the last edge pulled one bin left — the exact Ncount histogramdd needs — using the same branchless SIMD/binary search as the count kernels. Replaces the general (slow) np.searchsorted call in the D-dimensional hot loop.

public delegate void DirectILKernelGenerator.HistogramSearchIndexKernel(void* samples, long count, void* edges, int numEdges, long* outIdx)

Parameters

samples void*

Contiguous samples in the compare dtype C.

count long

Number of samples.

edges void*

Contiguous numEdges monotonic edges in dtype C.

numEdges int

Number of edges (len(edges)).

outIdx long*

Output int64 bin numbers of length count (range [0, numEdges]).