Rust

NumKong for Rust

numkong = "8" 8.0.0-rc.1 · b1f866ab

Traits cover scalar metric families. Tensor, Vector, and packed matrix types cover the higher-level workflows. Custom allocators, low-precision storage wrappers, and explicit row-contiguity checks stay visible instead of being hidden behind a dynamic runtime. The crate makes the storage policy and result promotion visible. That matters for fp16, bf16, fp8, packed bits, and strided reductions.

Topics

Installation
Quickstart2
HighlightsThis is the most fully featured high-level SDK after Python.
Scalar Types319The scalar wrappers are storage-first types.
Tensors and Views374The container model is unusual enough that it needs direct documentation.
Dot Products6Dot products span real, complex, quantized, and packed storage types.
Dense Distances10The dense spatial family covers sqeuclidean, euclidean, and angular.
Set Similarity7Packed-binary metrics work on packed words instead of boolean slices.
Probability Metrics9
Geospatial Metrics14Inputs are latitudes and longitudes in radians.
Curved Metrics6Curved-space kernels combine vectors with an extra metric tensor or covariance inverse.
Elementwise and Reductions97Elementwise kernels live on tensors and views.
Sparse Operations7Sparse helpers cover both sorted-index intersection and weighted sparse dot products.
Matrix Kernels94Packed kernels are the main "matrix throughput" path in the crate.
MaxSim23MaxSim is the late-interaction primitive used by systems such as ColBERT.
Mesh Alignment44ShapesPackedMatrix packs point clouds of any sizes once each, centered and rotated onto their principal axes.
Runtime Dispatch42Capabilities answers for the CPU and each GPU group through its associated functions, and Capabilities::configurethread enables CPU-specific acceleration features such as Intel AMX.
ParallelismNumKong does not own a thread pool.
External Memory5Views wrap raw pointers without ownership, owned containers accept custom allocators, and the scalar trait API works on any &[T] regardless of how the memory was allocated.
Platform Notes3Exact floating-point equality is rarely what you want after arithmetic.