C++

NumKong for C++

target_link_libraries(my_target PRIVATE numkong) 8.0.0-rc.1 · b1f866ab

The ABI is stable, versioned, and callable from any language that can load a shared library. There is no runtime overhead: no hidden thread pool, no implicit allocation, no garbage collector interaction. The C++ layer stays thin, typed, allocator-aware, and close enough to inline through, adding type-level result promotion and owning containers without hiding the dispatch model or the mixed-precision policy.

Topics

Installation
Quickstart5Every operation has one such dispatch point, named with best, which runs the best capability in the mask it gets; the root README describes the dispatch model once.
HighlightsThis is the primary SDK in the project.
Scalar Types170The scalar wrappers in include/numkong/types.hpp are storage-first types.
Tensors and Views198The native containers are where most integration mistakes happen.
Dot Products2Dot products are one of the broadest parts of the native SDK.
Dense Distances3The dense spatial kernels cover the SciPy-style sqeuclidean, euclidean, and angular family.
Set Similarity2Packed-binary metrics operate on packed words, not on byte-wise booleans.
Probability Metrics2Probability kernels target divergences directly instead of making you rebuild them from scalar loops.
Geospatial Metrics13The native SDK exposes both the fast spherical approximation and the more accurate ellipsoidal solver, each between every row and every column of two packed point sets.
Curved Metrics2Curved-space kernels are separate from the flat Euclidean family because their dataflow is different.
Elementwise and Reductions27
Sparse Operations2Sparse helpers cover sorted-index intersection and weighted sparse dot products.
Matrix Kernels47This is a separate native subsystem from the raw vector kernels.
MaxSim6MaxSim is the late-interaction primitive used by systems such as ColBERT.
Mesh Alignment29Shape kernels compare 3D point clouds of any size, with no correspondence between points: Chamfer, Hausdorff, Wasserstein-Procrustes, and Gromov-Wasserstein.
Runtime Dispatch11Linking the library is the default, and the way to ship one binary across many CPU generations.
ParallelismNumKong does not manage its own threads.
External Memory2Every kernel takes plain pointers, so any CPU-accessible memory works: mmap, pinned buffers, CUDA unified memory, custom arenas.
Platform Notes