Expand description
Distance computations with SIMD acceleration and optional GPU offload
Dispatch priority: GPU (if gpu feature) → SimSIMD (if simd feature) → scalar
Structs§
- Flat
Vectors - Flat vector storage — contiguous memory for cache-friendly access
Vectors are stored as a single
Vec<f32>slab:[v0_d0, v0_d1, ..., v1_d0, ...] - Visited
Set - Compact bitset for tracking visited nodes during search
Functions§
- inner_
product - Inner product distance (negated for min-heap)
- l2_
squared - L2 squared distance — dispatches to best available implementation
- pq_
asymmetric_ distance - PQ asymmetric distance from precomputed lookup table
- scalar_
l2_ squared - Scalar L2² with 4 accumulators for ILP