Trait bevy_rapier3d::prelude::nalgebra::SimdValue [−]
pub trait SimdValue { type Element: SimdValue; type SimdBool: SimdBool; fn lanes() -> usize; fn splat(val: Self::Element) -> Self; fn extract(&self, i: usize) -> Self::Element; unsafe fn extract_unchecked(&self, i: usize) -> Self::Element; fn replace(&mut self, i: usize, val: Self::Element); unsafe fn replace_unchecked(&mut self, i: usize, val: Self::Element); fn select(self, cond: Self::SimdBool, other: Self) -> Self; fn map_lanes(self, f: impl Fn(Self::Element) -> Self::Element) -> Self
where
Self: Clone, { ... } fn zip_map_lanes(
self,
b: Self,
f: impl Fn(Self::Element, Self::Element) -> Self::Element
) -> Self
where
Self: Clone, { ... } }
Expand description
Base trait for every SIMD types.
Associated Types
Required methods
Extracts the i-th lane of self
.
Panics if i >= Self::lanes()
.
unsafe fn extract_unchecked(&self, i: usize) -> Self::Element
unsafe fn extract_unchecked(&self, i: usize) -> Self::Element
Extracts the i-th lane of self
without bound-checking.
Replaces the i-th lane of self
by val
.
Panics if i >= Self::lanes()
.
unsafe fn replace_unchecked(&mut self, i: usize, val: Self::Element)
unsafe fn replace_unchecked(&mut self, i: usize, val: Self::Element)
Replaces the i-th lane of self
by val
without bound-checking.
Merges self
and other
depending on the lanes of cond
.
For each lane of cond
with bits set to 1, the result’s will contain the value of the lane of self
.
For each lane of cond
with bits set to 0, the result’s will contain the value of the lane of other
.
Provided methods
Applies a function to each lane of self
.
Note that, while convenient, this method can be extremely slow as this
requires to extract each lane of self
and then combine them again into
a new SIMD value.
Applies a function to each lane of self
paired with the corresponding lane of b
.
Note that, while convenient, this method can be extremely slow as this
requires to extract each lane of self
and then combine them again into
a new SIMD value.
Implementations on Foreign Types
pub unsafe fn extract_unchecked(&self, usize) -> <u16 as SimdValue>::Element
pub unsafe fn replace_unchecked(
&mut self,
usize,
val: <u16 as SimdValue>::Element
)
pub unsafe fn extract_unchecked(&self, usize) -> <u32 as SimdValue>::Element
pub unsafe fn replace_unchecked(
&mut self,
usize,
val: <u32 as SimdValue>::Element
)
pub unsafe fn extract_unchecked(&self, usize) -> <f64 as SimdValue>::Element
pub unsafe fn replace_unchecked(
&mut self,
usize,
val: <f64 as SimdValue>::Element
)
pub unsafe fn extract_unchecked(&self, usize) -> <i8 as SimdValue>::Element
pub unsafe fn replace_unchecked(
&mut self,
usize,
val: <i8 as SimdValue>::Element
)
pub unsafe fn extract_unchecked(&self, usize) -> <i128 as SimdValue>::Element
pub unsafe fn replace_unchecked(
&mut self,
usize,
val: <i128 as SimdValue>::Element
)
pub unsafe fn extract_unchecked(&self, usize) -> <i32 as SimdValue>::Element
pub unsafe fn replace_unchecked(
&mut self,
usize,
val: <i32 as SimdValue>::Element
)
pub unsafe fn extract_unchecked(&self, usize) -> <i16 as SimdValue>::Element
pub unsafe fn replace_unchecked(
&mut self,
usize,
val: <i16 as SimdValue>::Element
)
pub unsafe fn extract_unchecked(&self, usize) -> <f32 as SimdValue>::Element
pub unsafe fn replace_unchecked(
&mut self,
usize,
val: <f32 as SimdValue>::Element
)
pub unsafe fn extract_unchecked(&self, usize) -> <usize as SimdValue>::Element
pub unsafe fn replace_unchecked(
&mut self,
usize,
val: <usize as SimdValue>::Element
)
pub unsafe fn extract_unchecked(&self, usize) -> <u64 as SimdValue>::Element
pub unsafe fn replace_unchecked(
&mut self,
usize,
val: <u64 as SimdValue>::Element
)
pub unsafe fn extract_unchecked(&self, usize) -> <i64 as SimdValue>::Element
pub unsafe fn replace_unchecked(
&mut self,
usize,
val: <i64 as SimdValue>::Element
)
pub unsafe fn extract_unchecked(&self, usize) -> <u128 as SimdValue>::Element
pub unsafe fn replace_unchecked(
&mut self,
usize,
val: <u128 as SimdValue>::Element
)
pub unsafe fn extract_unchecked(&self, usize) -> <u8 as SimdValue>::Element
pub unsafe fn replace_unchecked(
&mut self,
usize,
val: <u8 as SimdValue>::Element
)
pub unsafe fn extract_unchecked(&self, usize) -> <bool as SimdValue>::Element
pub unsafe fn replace_unchecked(
&mut self,
usize,
val: <bool as SimdValue>::Element
)
pub unsafe fn extract_unchecked(&self, usize) -> <isize as SimdValue>::Element
pub unsafe fn replace_unchecked(
&mut self,
usize,
val: <isize as SimdValue>::Element
)
Implementors
pub unsafe fn extract_unchecked(
&self,
i: usize
) -> <Complex<N> as SimdValue>::Element
pub unsafe fn replace_unchecked(
&mut self,
i: usize,
val: <Complex<N> as SimdValue>::Element
)
type Element = Quaternion<<T as SimdValue>::Element>
pub unsafe fn replace_unchecked(
&mut self,
i: usize,
val: <Quaternion<T> as SimdValue>::Element
)
[src]pub fn select(
self,
cond: <Quaternion<T> as SimdValue>::SimdBool,
other: Quaternion<T>
) -> Quaternion<T>
[src]impl<T> SimdValue for Unit<Complex<T>> where
T: SimdRealField,
<T as SimdValue>::Element: SimdRealField,
[src]
impl<T> SimdValue for Unit<Complex<T>> where
T: SimdRealField,
<T as SimdValue>::Element: SimdRealField,
[src]type Element = Unit<Quaternion<<T as SimdValue>::Element>>
pub unsafe fn extract_unchecked(
&self,
i: usize
) -> <Unit<Quaternion<T>> as SimdValue>::Element
[src]pub unsafe fn replace_unchecked(
&mut self,
i: usize,
val: <Unit<Quaternion<T>> as SimdValue>::Element
)
[src]pub fn select(
self,
cond: <Unit<Quaternion<T>> as SimdValue>::SimdBool,
other: Unit<Quaternion<T>>
) -> Unit<Quaternion<T>>
[src]impl<T, C, const D: usize> SimdValue for Transform<T, C, D> where
C: TCategory,
T: RealField,
<T as SimdValue>::Element: Scalar,
Const<D>: DimNameAdd<Const<1_usize>>,
DefaultAllocator: Allocator<T, <Const<D> as DimNameAdd<Const<1_usize>>>::Output, <Const<D> as DimNameAdd<Const<1_usize>>>::Output>,
DefaultAllocator: Allocator<<T as SimdValue>::Element, <Const<D> as DimNameAdd<Const<1_usize>>>::Output, <Const<D> as DimNameAdd<Const<1_usize>>>::Output>,
[src]
impl<T, C, const D: usize> SimdValue for Transform<T, C, D> where
C: TCategory,
T: RealField,
<T as SimdValue>::Element: Scalar,
Const<D>: DimNameAdd<Const<1_usize>>,
DefaultAllocator: Allocator<T, <Const<D> as DimNameAdd<Const<1_usize>>>::Output, <Const<D> as DimNameAdd<Const<1_usize>>>::Output>,
DefaultAllocator: Allocator<<T as SimdValue>::Element, <Const<D> as DimNameAdd<Const<1_usize>>>::Output, <Const<D> as DimNameAdd<Const<1_usize>>>::Output>,
[src]type Element = Matrix<<T as SimdValue>::Element, R, C, <DefaultAllocator as Allocator<<T as SimdValue>::Element, R, C>>::Buffer>
pub fn splat(
val: <Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer> as SimdValue>::Element
) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
[src]pub fn extract(
&self,
i: usize
) -> <Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer> as SimdValue>::Element
[src]pub unsafe fn extract_unchecked(
&self,
i: usize
) -> <Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer> as SimdValue>::Element
[src]pub fn replace(
&mut self,
i: usize,
val: <Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer> as SimdValue>::Element
)
[src]pub unsafe fn replace_unchecked(
&mut self,
i: usize,
val: <Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer> as SimdValue>::Element
)
[src]impl<T, R, const D: usize> SimdValue for Isometry<T, R, D> where
T: SimdRealField,
R: SimdValue<SimdBool = <T as SimdValue>::SimdBool> + AbstractRotation<T, D>,
<T as SimdValue>::Element: SimdRealField,
<R as SimdValue>::Element: AbstractRotation<<T as SimdValue>::Element, D>,
[src]
impl<T, R, const D: usize> SimdValue for Isometry<T, R, D> where
T: SimdRealField,
R: SimdValue<SimdBool = <T as SimdValue>::SimdBool> + AbstractRotation<T, D>,
<T as SimdValue>::Element: SimdRealField,
<R as SimdValue>::Element: AbstractRotation<<T as SimdValue>::Element, D>,
[src]impl<T, R, const D: usize> SimdValue for Similarity<T, R, D> where
T: SimdRealField,
R: SimdValue<SimdBool = <T as SimdValue>::SimdBool> + AbstractRotation<T, D>,
<T as SimdValue>::Element: SimdRealField,
<R as SimdValue>::Element: AbstractRotation<<T as SimdValue>::Element, D>,
[src]
impl<T, R, const D: usize> SimdValue for Similarity<T, R, D> where
T: SimdRealField,
R: SimdValue<SimdBool = <T as SimdValue>::SimdBool> + AbstractRotation<T, D>,
<T as SimdValue>::Element: SimdRealField,
<R as SimdValue>::Element: AbstractRotation<<T as SimdValue>::Element, D>,
[src]pub unsafe fn extract_unchecked(
&self,
i: usize
) -> <Similarity<T, R, D> as SimdValue>::Element
[src]pub unsafe fn replace_unchecked(
&mut self,
i: usize,
val: <Similarity<T, R, D> as SimdValue>::Element
)
[src]pub fn select(
self,
cond: <Similarity<T, R, D> as SimdValue>::SimdBool,
other: Similarity<T, R, D>
) -> Similarity<T, R, D>
[src]type Element = Translation<<T as SimdValue>::Element, D>
pub unsafe fn replace_unchecked(
&mut self,
i: usize,
val: <Translation<T, D> as SimdValue>::Element
)
[src]pub fn select(
self,
cond: <Translation<T, D> as SimdValue>::SimdBool,
other: Translation<T, D>
) -> Translation<T, D>
[src]