Expand description
Lane-Associated Vector (LAV): Portable SIMD vector trait as GAT of SIMD lane trait.
NOTE: This crate requires nightly Rust.
Features
- SIMD lane trait
Real
abstracting overf32
andf64
. - SIMD vector trait
SimdReal<Real, LANES>
abstracting overSimd<f32, LANES>
andSimd<f64, LANES>
. - Generic associated type (GAT)
Real::Simd<LANES>
as part of SIMD lane traitReal
implementing SIMD vector traitSimdReal<Self, LANES>
for itself as lane type where the GAT is generic over the number of SIMD vectorLANES
. - Lanewise approximate equality test wrt to epsilon and ULP SIMD vectors.
ApproxEq
trait complementingPartialEq
.- Safe
FromUnchecked
andIntoUnchecked
complementingFrom
andInto
where the behavior may be unspecified but will not result in undefined behavior if the caller breaks any logical constraint. - Non-reflexive
PeelFrom
andPeelInto
traits complementingFrom
andInto
without conflicting implementations. - Safe
WrapFromUnchecked
andWrapIntoUnchecked
complementingPeelFrom
andPeelInto
where the behavior may be unspecified but will not result in undefined behavior if the caller breaks any logical constraint. Assert
structure asserting constant generic expression when bound by traitTrue
.no_std
without loss of functionality by enabling thelibm
feature.
This example
uses SIMD generically over floating-point types while hiding it from the user.
Modules
Macros
Constructs vector by selecting values from the lanes of one or two source vectors.
Structs
Traits
Tests for approximate equality.
Compile-time unchecked but safe
From
.Compile-time unchecked but safe
Into
.Selects lanes from two vectors by mask vector.
Mask vector of
Mask<i32, LANES>
or Mask<i64, LANES>
.Real number vector of
Simd<f32, LANES>
or Simd<f64, LANES>
with associated SimdBits
and SimdMask
vector.Compile-time unchecked but safe inverse of
PeelFrom
.Compile-time unchecked but safe inverse of
PeelInto
.