Expand description
SIMD-accelerated operations for rustyhdf5.
This crate provides runtime-dispatched SIMD acceleration for common vector operations used in HDF5 processing: dot products, cosine similarity, L2 distance, f16 conversion, and checksums.
All public functions automatically select the best available SIMD backend at runtime. Every operation has a portable scalar fallback.
Modules§
- avx2
- AVX2 SIMD implementations for x86_64. All functions require runtime detection via is_x86_feature_detected!(“avx2”).
- checksum
- SIMD-accelerated checksum implementations.
- convert
- f16/f32 conversion with SIMD acceleration.
- scalar
- Portable scalar implementations of all operations. These serve as fallbacks when SIMD is not available.
Enums§
- Backend
- Available SIMD backends.
Constants§
Functions§
- align_
to_ cache_ line - Round
sizeup to the next multiple ofCACHE_LINE_SIZE. - batch_
cosine - Compute cosine similarity between a query and multiple vectors.
- batch_
cosine_ prenorm - Compute cosine similarity with pre-normalized query vector.
- batch_
norms - Compute L2 norms for a batch of vectors.
- checksum_
fletcher32 - Compute Fletcher-32 checksum.
- cosine_
similarity - Compute cosine similarity between two vectors (fused single-pass).
- detect_
backend - Detect the best available SIMD backend at runtime.
- dot_
product - Compute the dot product of two f32 slices.
- f16_
to_ f32_ batch - Convert a batch of f16 values (as raw u16 bits) to f32.
- l2_
distance - Compute L2 (Euclidean) distance between two vectors.
- vector_
norm - Compute the L2 norm (magnitude) of a vector.