pub struct SafeSimdVector<T, const WIDTH: usize> { /* private fields */ }Expand description
Type-safe SIMD vector with compile-time width verification
Implementations§
Source§impl<T, const WIDTH: usize> SafeSimdVector<T, WIDTH>
impl<T, const WIDTH: usize> SafeSimdVector<T, WIDTH>
Sourcepub const fn new(data: [T; WIDTH]) -> Self
pub const fn new(data: [T; WIDTH]) -> Self
Create a new SIMD vector with compile-time width validation
Sourcepub fn as_mut_slice(&mut self) -> &mut [T]
pub fn as_mut_slice(&mut self) -> &mut [T]
Mutable access to the underlying data
Sourcepub fn into_array(self) -> [T; WIDTH]
pub fn into_array(self) -> [T; WIDTH]
Convert to array
Sourcepub fn from_slice(slice: &[T]) -> Option<Self>
pub fn from_slice(slice: &[T]) -> Option<Self>
Load from slice with compile-time length checking
Sourcepub fn extract_lane(&self, lane: usize) -> Option<T>
pub fn extract_lane(&self, lane: usize) -> Option<T>
Safely extract a lane
Sourcepub fn replace_lane(&mut self, lane: usize, value: T) -> bool
pub fn replace_lane(&mut self, lane: usize, value: T) -> bool
Safely replace a lane
Trait Implementations§
Source§impl<T, const WIDTH: usize> Add for SafeSimdVector<T, WIDTH>
Compile-time validated SIMD arithmetic operations
impl<T, const WIDTH: usize> Add for SafeSimdVector<T, WIDTH>
Compile-time validated SIMD arithmetic operations
Source§impl<T: Clone, const WIDTH: usize> Clone for SafeSimdVector<T, WIDTH>
impl<T: Clone, const WIDTH: usize> Clone for SafeSimdVector<T, WIDTH>
Source§fn clone(&self) -> SafeSimdVector<T, WIDTH>
fn clone(&self) -> SafeSimdVector<T, WIDTH>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T, const WIDTH: usize> Div for SafeSimdVector<T, WIDTH>
impl<T, const WIDTH: usize> Div for SafeSimdVector<T, WIDTH>
Source§impl<T, const WIDTH: usize> Mul for SafeSimdVector<T, WIDTH>
impl<T, const WIDTH: usize> Mul for SafeSimdVector<T, WIDTH>
Auto Trait Implementations§
impl<T, const WIDTH: usize> Freeze for SafeSimdVector<T, WIDTH>where
T: Freeze,
impl<T, const WIDTH: usize> RefUnwindSafe for SafeSimdVector<T, WIDTH>where
T: RefUnwindSafe,
impl<T, const WIDTH: usize> Send for SafeSimdVector<T, WIDTH>where
T: Send,
impl<T, const WIDTH: usize> Sync for SafeSimdVector<T, WIDTH>where
T: Sync,
impl<T, const WIDTH: usize> Unpin for SafeSimdVector<T, WIDTH>where
T: Unpin,
impl<T, const WIDTH: usize> UnsafeUnpin for SafeSimdVector<T, WIDTH>where
T: UnsafeUnpin,
impl<T, const WIDTH: usize> UnwindSafe for SafeSimdVector<T, WIDTH>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more