Expand description
SIMD-accelerated distance calculations.
Functions§
- cosine_
distance - Cosine distance:
1 - cos(a, b). - dot_
product - Dot product with SIMD acceleration.
- l2_
distance - L2 (Euclidean) distance with SIMD acceleration.
- l2_
distance_ squared - L2 distance squared (no sqrt) for comparisons.
- l2_
squared_ decomposed - L2 distance squared using decomposition: ||a-b||² = ||a||² + ||b||² - 2⟨a,b⟩
- norm_
squared - Compute squared norm of a vector (||v||²)