Skip to main content

Crate rustyhdf5_accel

Crate rustyhdf5_accel 

Source
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§

CACHE_LINE_SIZE

Functions§

align_to_cache_line
Round size up to the next multiple of CACHE_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.