Go

NumKong for Go

import nk "github.com/ashvardanian/NumKong/golang" 8.0.0-rc.1 · b1f866ab

Topics

InstallationThe Go binding links the prebuilt static NumKong library through cGo, so programs carry it whole.
Quickstart
HighlightsSlice-based API.
Scalar Types2
Dot Products4Dot products cover float64, float32, int8, and uint8.
Dense Distances12The dense distance family includes squared Euclidean, Euclidean, and angular distance.
Set Similarity5Hamming and Jaccard distances for binary and set-hash vectors.
Probability Metrics4Kullback-Leibler divergence and Jensen-Shannon distance for probability distributions.
Geospatial Metrics2The Go package also exposes Haversine and Vincenty helpers, from every point of one set to every point of another.
Matrix Kernels67Packed kernels are the main batch-throughput path.
MaxSim7MaxSim is the late-interaction primitive used by systems such as ColBERT.
Runtime Dispatch12A Device is the host CPU, from CPU(), or a GPU by its runtime's own ordinal, from NewDevice(DeviceCUDA, 0) and its DeviceROCm and DeviceMetal twins, counted by CountDevices.
Parallelism4WorkerPool provides pre-pinned goroutines with pre-configured SIMD state.
Platform NotesThis package is a cGo wrapper over the C library.