pub struct F32x4(/* private fields */);Trait Implementations§
Source§impl AddAssign<<F32x4 as SimdConsts>::Scalar> for F32x4
impl AddAssign<<F32x4 as SimdConsts>::Scalar> for F32x4
Source§fn add_assign(&mut self, rhs: <Self as SimdConsts>::Scalar)
fn add_assign(&mut self, rhs: <Self as SimdConsts>::Scalar)
Performs the
+= operation. Read moreSource§impl AddAssign for F32x4
impl AddAssign for F32x4
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl BitAndAssign<<F32x4 as SimdConsts>::Scalar> for F32x4
impl BitAndAssign<<F32x4 as SimdConsts>::Scalar> for F32x4
Source§fn bitand_assign(&mut self, rhs: <Self as SimdConsts>::Scalar)
fn bitand_assign(&mut self, rhs: <Self as SimdConsts>::Scalar)
Performs the
&= operation. Read moreSource§impl BitAndAssign for F32x4
impl BitAndAssign for F32x4
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
Performs the
&= operation. Read moreSource§impl BitOrAssign<<F32x4 as SimdConsts>::Scalar> for F32x4
impl BitOrAssign<<F32x4 as SimdConsts>::Scalar> for F32x4
Source§fn bitor_assign(&mut self, rhs: <Self as SimdConsts>::Scalar)
fn bitor_assign(&mut self, rhs: <Self as SimdConsts>::Scalar)
Performs the
|= operation. Read moreSource§impl BitOrAssign for F32x4
impl BitOrAssign for F32x4
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the
|= operation. Read moreSource§impl BitXorAssign<<F32x4 as SimdConsts>::Scalar> for F32x4
impl BitXorAssign<<F32x4 as SimdConsts>::Scalar> for F32x4
Source§fn bitxor_assign(&mut self, rhs: <Self as SimdConsts>::Scalar)
fn bitxor_assign(&mut self, rhs: <Self as SimdConsts>::Scalar)
Performs the
^= operation. Read moreSource§impl BitXorAssign for F32x4
impl BitXorAssign for F32x4
Source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
Performs the
^= operation. Read moreSource§impl DivAssign<<F32x4 as SimdConsts>::Scalar> for F32x4
impl DivAssign<<F32x4 as SimdConsts>::Scalar> for F32x4
Source§fn div_assign(&mut self, rhs: <Self as SimdConsts>::Scalar)
fn div_assign(&mut self, rhs: <Self as SimdConsts>::Scalar)
Performs the
/= operation. Read moreSource§impl DivAssign for F32x4
impl DivAssign for F32x4
Source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Performs the
/= operation. Read moreSource§impl MulAssign<<F32x4 as SimdConsts>::Scalar> for F32x4
impl MulAssign<<F32x4 as SimdConsts>::Scalar> for F32x4
Source§fn mul_assign(&mut self, rhs: <Self as SimdConsts>::Scalar)
fn mul_assign(&mut self, rhs: <Self as SimdConsts>::Scalar)
Performs the
*= operation. Read moreSource§impl MulAssign for F32x4
impl MulAssign for F32x4
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*= operation. Read moreSource§impl SimdBaseIo for F32x4
impl SimdBaseIo for F32x4
unsafe fn load_from_array(array: Self::ArrayRepresentation) -> Self
Source§unsafe fn load_from_ptr_unaligned(ptr: *const Self::Scalar) -> Self
unsafe fn load_from_ptr_unaligned(ptr: *const Self::Scalar) -> Self
Load a vector from an unaligned raw pointer.
Source§unsafe fn copy_to_ptr_unaligned(self, ptr: *mut Self::Scalar)
unsafe fn copy_to_ptr_unaligned(self, ptr: *mut Self::Scalar)
Store a vector to an unaligned raw pointer.
Source§unsafe fn load_from_ptr_aligned(ptr: *const Self::Scalar) -> Self
unsafe fn load_from_ptr_aligned(ptr: *const Self::Scalar) -> Self
Load a vector from a 32 bit aligned raw pointer.
Source§unsafe fn copy_to_ptr_aligned(self, ptr: *mut Self::Scalar)
unsafe fn copy_to_ptr_aligned(self, ptr: *mut Self::Scalar)
Store a vector to a 32 bit aligned raw pointer.
unsafe fn underlying_value(self) -> Self::UnderlyingType
unsafe fn underlying_value_mut(&mut self) -> &mut Self::UnderlyingType
unsafe fn from_underlying_value(value: Self::UnderlyingType) -> Self
Source§unsafe fn transmute_into_array_ref(&self) -> &Self::ArrayRepresentation
unsafe fn transmute_into_array_ref(&self) -> &Self::ArrayRepresentation
Transmutes the vector into a array representation defined by
Self::ArrayRepresentation.
Please don’t use this function directly unless necessary.Source§unsafe fn transmute_into_array_mut(&mut self) -> &mut Self::ArrayRepresentation
unsafe fn transmute_into_array_mut(&mut self) -> &mut Self::ArrayRepresentation
Transmutes the vector into a mutable array representation defined by
Self::ArrayRepresentation.
Please don’t use this function directly unless necessary.unsafe fn as_array(&self) -> Self::ArrayRepresentation
Source§unsafe fn get_unchecked(&self, index: usize) -> Self::Scalar
unsafe fn get_unchecked(&self, index: usize) -> Self::Scalar
Gets the value at the specified index, without a bounds check.
Source§unsafe fn get_unchecked_mut<'a>(&mut self, index: usize) -> &'a mut Self::Scalar
unsafe fn get_unchecked_mut<'a>(&mut self, index: usize) -> &'a mut Self::Scalar
Gets the value at the specified index, without a bounds check.
Source§fn load_from_slice_exact(slice: &[Self::Scalar]) -> Result<Self, usize>
fn load_from_slice_exact(slice: &[Self::Scalar]) -> Result<Self, usize>
Tries to load from a slice. If the slice is too short, it returns the length of the slice.
Source§fn load_from_slice(slice: &[Self::Scalar]) -> Self
fn load_from_slice(slice: &[Self::Scalar]) -> Self
Tries to load from a slice. If the slice is too short, it uses zeroes for the remaining values.
Source§fn copy_to_slice_exact(self, slice: &mut [Self::Scalar]) -> Result<(), usize>
fn copy_to_slice_exact(self, slice: &mut [Self::Scalar]) -> Result<(), usize>
Tries to copy to a slice. If the slice is too short, it returns the length of the slice.
Source§fn copy_to_slice(self, slice: &mut [Self::Scalar])
fn copy_to_slice(self, slice: &mut [Self::Scalar])
Tries to copy to a slice. If the slice is too short, it copies as much as possible until the end of the slice.
Source§impl SimdBaseOps for F32x4
impl SimdBaseOps for F32x4
Source§fn blendv(self, a: Self, b: Self) -> Self
fn blendv(self, a: Self, b: Self) -> Self
Element-wise “blend” between two vectors. A is selected if the mask value
is zero, and B is selected if the mask value is all 1’s. undefined behavior if
it’s anything in between. See note below. Read more
Source§fn cmp_eq(self, rhs: Self) -> Self
fn cmp_eq(self, rhs: Self) -> Self
Element-wise equality between two vectors. If two elements are equal, it returns all 1’s
in the corresponding element of the result, otherwise it returns all 0’s.
Source§fn cmp_neq(self, rhs: Self) -> Self
fn cmp_neq(self, rhs: Self) -> Self
Element-wise inequality between two vectors. If two elements are not equal, it returns all 1’s
in the corresponding element of the result, otherwise it returns all 0’s.
Source§fn cmp_lt(self, rhs: Self) -> Self
fn cmp_lt(self, rhs: Self) -> Self
Element-wise less than between two vectors. If the first element is less than the second element,
it returns all 1’s in the corresponding element of the result, otherwise it returns all 0’s.
Source§fn cmp_lte(self, rhs: Self) -> Self
fn cmp_lte(self, rhs: Self) -> Self
Element-wise less than or equal to between two vectors. If the first element is less than or equal to the second element,
it returns all 1’s in the corresponding element of the result, otherwise it returns all 0’s.
Source§fn cmp_gt(self, rhs: Self) -> Self
fn cmp_gt(self, rhs: Self) -> Self
Element-wise greater than between two vectors. If the first element is greater than the second element,
it returns all 1’s in the corresponding element of the result, otherwise it returns all 0’s.
Source§fn cmp_gte(self, rhs: Self) -> Self
fn cmp_gte(self, rhs: Self) -> Self
Element-wise greater than or equal to between two vectors. If the first element is greater than or equal to the second element,
it returns all 1’s in the corresponding element of the result, otherwise it returns all 0’s.
Source§fn horizontal_add(self) -> Self::HorizontalAddScalar
fn horizontal_add(self) -> Self::HorizontalAddScalar
Add every number in the vector together
Source§impl SimdConsts for F32x4
impl SimdConsts for F32x4
const WIDTH: usize = 4
type Scalar = f32
type HorizontalAddScalar = f32
Source§type ArrayRepresentation = [f32; 4]
type ArrayRepresentation = [f32; 4]
The type of the transmuted array representation. This is to make indexing operations easier.
We are unable to use
&[Self::Scalar; Self::WIDTH] because constants are not allowed.Source§type UnderlyingType = __m128
type UnderlyingType = __m128
The underlying intrinsic SIMD type.
type Engine = Sse2
Source§impl SimdFloat for F32x4
impl SimdFloat for F32x4
Source§fn fast_ceil(self) -> Self
fn fast_ceil(self) -> Self
Alternative element-wise ceilings between two vectors.
When using Sse2, this uses a faster version of ceiling
that only works on floating point values small enough to fit in
an i32. This is a big performance boost if you don’t need
a complete ceiling.
Source§fn fast_floor(self) -> Self
fn fast_floor(self) -> Self
Alternative element-wise floors between two vectors.
When using Sse2, this uses a faster version of floor
that only works on floating point values small enough to fit in
an i32. This is a big performance boost if you don’t need
a complete floor.
Source§fn fast_round(self) -> Self
fn fast_round(self) -> Self
Alternative element-wise rounds between two vectors.
When using Sse2, this uses a faster version of round
that only works on floating point values small enough to fit in
an i32. This is a big performance boost if you don’t need
a complete round.
Source§fn mul_add(self, a: Self, b: Self) -> Self
fn mul_add(self, a: Self, b: Self) -> Self
Element-wise multiply add. This performs
Self * A + BSource§fn mul_sub(self, a: Self, b: Self) -> Self
fn mul_sub(self, a: Self, b: Self) -> Self
Element-wise multiply subtract. This performs
Self * A - BSource§fn neg_mul_add(self, a: Self, b: Self) -> Self
fn neg_mul_add(self, a: Self, b: Self) -> Self
Element-wise negative multiply add. This performs
-(Self * A) + BSource§fn neg_mul_sub(self, a: Self, b: Self) -> Self
fn neg_mul_sub(self, a: Self, b: Self) -> Self
Element-wise negative multiply subtract. This performs
-(Self * A) - Bfn from_f64(value: f64) -> Self
Source§impl SimdFloat32 for F32x4
impl SimdFloat32 for F32x4
Source§fn bitcast_i32(self) -> <Self::Engine as Simd>::Vi32
fn bitcast_i32(self) -> <Self::Engine as Simd>::Vi32
Bit cast to i32.
This function is only used for compilation and does not generate any instructions, thus it has zero latency.
Source§fn cast_i32(self) -> <Self::Engine as Simd>::Vi32
fn cast_i32(self) -> <Self::Engine as Simd>::Vi32
Element-wise cast to i32 (rounded to nearest, ties to even; not floored).
Note, this may cause undefined behavior when casting from numbers outside the range of i32.
E.g. a very large positive float may become i32::MIN.
Source§fn fast_inverse(self) -> Self
fn fast_inverse(self) -> Self
Element-wise fast reciprocal (1.0 / x)
Source§impl SimdTransmuteF32 for F32x4
impl SimdTransmuteF32 for F32x4
Source§fn try_transmute_sse2(&self) -> __m128
fn try_transmute_sse2(&self) -> __m128
Tries to transmute the value into its underlying Sse2 type. Panics if the value is not a Sse2.
Source§fn try_transmute_from_sse2(val: __m128) -> Self
fn try_transmute_from_sse2(val: __m128) -> Self
Tries to create the value from its underlying Sse2 type. Panics if the value is not a Sse2.
Source§fn try_transmute_scalar(&self) -> f32
fn try_transmute_scalar(&self) -> f32
Tries to transmute the value into its underlying scalar type. Panics if the value is not a scalar.
Source§fn try_transmute_from_scalar(_scalar: f32) -> Self
fn try_transmute_from_scalar(_scalar: f32) -> Self
Tries to create the value from its underlying scalar type. Panics if the value is not a scalar.
Source§fn try_transmute_sse41(&self) -> __m128
fn try_transmute_sse41(&self) -> __m128
Tries to transmute the value into its underlying Sse4.1 type. Panics if the value is not a Sse4.1.
Source§fn try_transmute_from_sse41(_sse41: __m128) -> Self
fn try_transmute_from_sse41(_sse41: __m128) -> Self
Tries to create the value from its underlying Sse4.1 type. Panics if the value is not a Sse4.1.
Source§fn try_transmute_avx2(&self) -> __m256
fn try_transmute_avx2(&self) -> __m256
Tries to transmute the value into its underlying Avx2 type. Panics if the value is not a Avx2.
Source§fn try_transmute_from_avx2(_avx2: __m256) -> Self
fn try_transmute_from_avx2(_avx2: __m256) -> Self
Tries to create the value from its underlying Avx2 type. Panics if the value is not a Avx2.
Source§fn try_transmute_avx512(&self) -> __m512
fn try_transmute_avx512(&self) -> __m512
Tries to transmute the value into its underlying Avx512 type. Panics if the value is not a Avx512.
Source§fn try_transmute_from_avx512(_avx512: __m512) -> Self
fn try_transmute_from_avx512(_avx512: __m512) -> Self
Tries to create the value from its underlying Avx512 type. Panics if the value is not a Avx512.
Source§impl SubAssign<<F32x4 as SimdConsts>::Scalar> for F32x4
impl SubAssign<<F32x4 as SimdConsts>::Scalar> for F32x4
Source§fn sub_assign(&mut self, rhs: <Self as SimdConsts>::Scalar)
fn sub_assign(&mut self, rhs: <Self as SimdConsts>::Scalar)
Performs the
-= operation. Read moreSource§impl SubAssign for F32x4
impl SubAssign for F32x4
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreimpl Copy for F32x4
Auto Trait Implementations§
impl Freeze for F32x4
impl RefUnwindSafe for F32x4
impl Send for F32x4
impl Sync for F32x4
impl Unpin for F32x4
impl UnsafeUnpin for F32x4
impl UnwindSafe for F32x4
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