Expand description
Lane-Associated Vector (LAV): Portable SIMD vector trait as GAT of SIMD lane trait.
NOTE: This crate requires nightly Rust.
This example uses SIMD generically over floating-point types while hiding it from the user.
§Features
- SIMD lane trait
Realabstracting overf32andf64. - SIMD vector trait
SimdReal<Real, N>abstracting overSimd<f32, N>andSimd<f64, N>. - Generic associated type (GAT)
Real::Simd<N>as part of SIMD lane traitRealimplementing SIMD vector traitSimdReal<Self, N>for itself as lane type where the GAT is generic over the number of SIMD vector lanesN. - AoS/SoA/AoSoA via
Real::as_simd/Real::as_simd_mutabstracting overas_simd/as_simd_mutoff32andf64slices. - Lanewise approximate equality test wrt to epsilon and ULP SIMD vectors.
ApproxEqtrait complementingPartialEq.
§Optional Features
Following features are disabled by default unless their feature gate is enabled:
target-features: Provides native number of SIMD vector lanesReal::NATIVE_LANE_COUNTfor the current build target.libm: Enablesno_stdwithout loss of functionality.
Modules§
Macros§
- swizzle
- Constructs vector by copying lanes from selected lanes of one or two input vectors.
Traits§
- Approx
Eq - Tests for approximate equality.
- Bits
- Bits representation of
Realnumber with associatedSimdBitsvector. - Real
- Real number of
f32orf64with associatedBitsrepresentation andSimdRealvector. - Select
- Selects lanes from two vectors by mask vector.
- Simd
Bits - Bits representation vector of
SimdRealvector with associatedSimdMaskvector. - Simd
Mask - Mask vector of
Mask<i32, N>orMask<i64, N>. - Simd
Real - Real number vector of
Simd<f32, N>orSimd<f64, N>with associatedSimdBitsandSimdMaskvector.