This is the most fully featured high-level SDK after Python. It is a good fit if you want most of the native breadth without dropping into a manual FFI layer.
Trait-first scalar API. Type::operation(&a, &b) stays compact and predictable. Allocator-aware tensors. Tensor, DotsPackedMatrix, and MaxSimPackedMatrix can use custom allocators. Storage-first low precision. f16, bf16, fp8, fp6, and packed integer wrappers are first-class types. Matrix kernels with explicit contracts. Packed and symmetric kernels validate shapes and row contiguity. No hidden thread pool. Parallel helpers remain host-controlled. Fork Union support. The parallel feature is the intended native orchestration layer.
§ Ecosystem Comparison
| Feature | NumKong | nalgebra | ndarray |
|---|---|---|---|
| Operation families | dots, distances, binary, probability, geospatial, curved, shapes, sparse, MaxSim, elementwise, reductions, cast, trig | linear algebra, decompositions | general n-dimensional arithmetic |
| Precision | BFloat16 through sub-byte; automatic widening; Kahan summation; 0 ULP in Float32/Float64 | Float32/Float64 only; no widening; standard accuracy | Float32/Float64 only; no widening; standard accuracy |
| Runtime SIMD dispatch | per call, the highest capability the CPU runs and the build holds, across x86, Arm, RISC-V | none | none |
| Packed matrix, GEMM-like | pack once, reuse across query batches | standard matmul; no persistent packing | dot for matmul; no persistent packing |
| Symmetric kernels, SYRK-like | skip duplicate pairs, up to 2x speedup for self-distance | no duplicate-pair skipping | no duplicate-pair skipping |
| Memory model | Caller-owned; Tensor/DotsPackedMatrix support custom allocators | Heap-allocated matrices; custom storage trait | Heap-allocated; no custom allocator support |
| Host-side parallelism | row-range partitioning via reusable ThreadPool; no hidden threads | Rayon-based parallelism possible | Rayon-based parallelism possible |
NumKong validates f16 and bf16 interop against the half crate in its own test suite.
That lets you move between ecosystem-standard half types and NumKong’s kernel-facing wrappers without ambiguity.