pub struct OptimizedSimdOp<T, const WIDTH: usize> { /* private fields */ }Expand description
Zero-cost wrapper for optimized operations with compile-time dispatch
Implementations§
Source§impl<T, const WIDTH: usize> OptimizedSimdOp<T, WIDTH>
impl<T, const WIDTH: usize> OptimizedSimdOp<T, WIDTH>
pub const fn new() -> Self
Sourcepub fn dot_product(
a: &SafeSimdVector<T, WIDTH>,
b: &SafeSimdVector<T, WIDTH>,
) -> T
pub fn dot_product( a: &SafeSimdVector<T, WIDTH>, b: &SafeSimdVector<T, WIDTH>, ) -> T
Dot product with compile-time width validation
Sourcepub fn element_wise_multiply(
a: &SafeSimdVector<T, WIDTH>,
b: &SafeSimdVector<T, WIDTH>,
) -> SafeSimdVector<T, WIDTH>
pub fn element_wise_multiply( a: &SafeSimdVector<T, WIDTH>, b: &SafeSimdVector<T, WIDTH>, ) -> SafeSimdVector<T, WIDTH>
Element-wise multiplication with type safety
Sourcepub fn horizontal_sum(vector: &SafeSimdVector<T, WIDTH>) -> T
pub fn horizontal_sum(vector: &SafeSimdVector<T, WIDTH>) -> T
Reduction operations with compile-time lane validation
Sourcepub fn horizontal_max(vector: &SafeSimdVector<T, WIDTH>) -> Twhere
T: PartialOrd + Copy,
pub fn horizontal_max(vector: &SafeSimdVector<T, WIDTH>) -> Twhere
T: PartialOrd + Copy,
Find maximum with compile-time guarantees
Trait Implementations§
Auto Trait Implementations§
impl<T, const WIDTH: usize> Freeze for OptimizedSimdOp<T, WIDTH>
impl<T, const WIDTH: usize> RefUnwindSafe for OptimizedSimdOp<T, WIDTH>where
T: RefUnwindSafe,
impl<T, const WIDTH: usize> Send for OptimizedSimdOp<T, WIDTH>where
T: Send,
impl<T, const WIDTH: usize> Sync for OptimizedSimdOp<T, WIDTH>where
T: Sync,
impl<T, const WIDTH: usize> Unpin for OptimizedSimdOp<T, WIDTH>where
T: Unpin,
impl<T, const WIDTH: usize> UnsafeUnpin for OptimizedSimdOp<T, WIDTH>
impl<T, const WIDTH: usize> UnwindSafe for OptimizedSimdOp<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> 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