Expand description
§Basic SIMD Vector Operations
Fundamental vector operations optimized with SIMD instructions including dot products, norms, distance calculations, and basic linear algebra operations.
§Features
- Dot Product: SIMD-optimized dot product with platform-specific implementations
- Vector Norms: L1, L2, and infinity norms with high performance
- Distance Metrics: Euclidean, Manhattan, and cosine distance/similarity
- Advanced Operations: Cross product and outer product for linear algebra
- Multi-Platform: SSE2, AVX2, AVX512, and NEON optimizations
- Scalar Fallbacks: Automatic fallback to scalar operations when needed
§Implementation Details
All functions automatically detect the best available SIMD instruction set and provide graceful fallback to scalar implementations. The functions are designed to handle arbitrary vector lengths efficiently by processing SIMD-sized chunks and handling remainders appropriately.
Functions§
- cosine_
similarity - SIMD-optimized cosine similarity computation
- cross_
product - SIMD-optimized cross product for 3D vectors
- dot_
product - SIMD-optimized dot product computation
- euclidean_
distance - SIMD-optimized Euclidean distance computation
- norm_
inf - SIMD-optimized infinity norm computation
- norm_l1
- SIMD-optimized L1 norm (Manhattan norm) computation
- norm_l2
- SIMD-optimized L2 norm (Euclidean norm) computation
- outer_
product - SIMD-optimized outer product computation