vecstasy 0.1.10

vecstasy is a library for SIMD-enabled floating-point operations on vectors.
Documentation
//! # vecstasy
//!
//! `vecstasy` is a minimal, high-performance Rust library for vector arithmetic.
//! It provides a generic `VecLike` trait for common vector operations and
//! two primary implementations:
//!
//! - **SIMD-backed linear algebra** (`[f32]` and `&[f32]`): Fast L2 distance, dot product, and normalization
//!   via SIMD. Should natively work on all platforms supported by LLVM, even the ones with no
//!   SIMD support (it falls back to sequential evaluation in that case).
//! - **`HashVec` wrapper**: Stable hashing and equality for `&[f32]` slices based on
//!   IEEE‑754 raw bits, distinguishing +0/−0 and NaNs for deterministic behavior.
//!
//! ## Features
//!
//! - **`VecLike` trait**: Defines `l2_dist_squared`, `dot`, and `normalized` methods.
//! - **Optimized implementations**: All implementations exploit CPU-based SIMD whenever available
//! - **Bit-wise hashing**: `HashVec` ensures identical bit-pattern vectors hash and compare consistently.
//!
//! ## Usage
//!
//! Add to your `Cargo.toml`:
//!
//! ```toml
//! [dependencies]
//! vecstasy = "0.1"
//! ```
//!
//! Then import and use:
//!
//! ```rust
//! use vecstasy::VecLike;
//! use vecstasy::HashVec;
//!
//! let data: &[f32] = &[0.0; 8];  // length should be multiple of the SIMD lane count, which is 8 by default
//! let hv = HashVec::from(data);
//! let normed = hv.normalized();
//! ```
//!
//! ## License
//!
//! MIT, see license file

#![feature(portable_simd)]

mod hashvec;
mod slice;
mod veclike;

pub use hashvec::*;
pub use slice::*;
pub use veclike::*;