Skip to main content

F32x4

Struct F32x4 

Source
pub struct F32x4(/* private fields */);

Trait Implementations§

Source§

impl Add<<F32x4 as SimdConsts>::Scalar> for F32x4

Source§

type Output = F32x4

The resulting type after applying the + operator.
Source§

fn add(self, rhs: <Self as SimdConsts>::Scalar) -> Self

Performs the + operation. Read more
Source§

impl Add<F32x4> for <F32x4 as SimdConsts>::Scalar

Source§

type Output = F32x4

The resulting type after applying the + operator.
Source§

fn add(self, rhs: F32x4) -> F32x4

Performs the + operation. Read more
Source§

impl Add for F32x4

Source§

type Output = F32x4

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self

Performs the + operation. Read more
Source§

impl AddAssign<<F32x4 as SimdConsts>::Scalar> for F32x4

Source§

fn add_assign(&mut self, rhs: <Self as SimdConsts>::Scalar)

Performs the += operation. Read more
Source§

impl AddAssign for F32x4

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

impl BitAnd<<F32x4 as SimdConsts>::Scalar> for F32x4

Source§

type Output = F32x4

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: <Self as SimdConsts>::Scalar) -> Self

Performs the & operation. Read more
Source§

impl BitAnd for F32x4

Source§

type Output = F32x4

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: Self) -> Self

Performs the & operation. Read more
Source§

impl BitAndAssign<<F32x4 as SimdConsts>::Scalar> for F32x4

Source§

fn bitand_assign(&mut self, rhs: <Self as SimdConsts>::Scalar)

Performs the &= operation. Read more
Source§

impl BitAndAssign for F32x4

Source§

fn bitand_assign(&mut self, rhs: Self)

Performs the &= operation. Read more
Source§

impl BitOr<<F32x4 as SimdConsts>::Scalar> for F32x4

Source§

type Output = F32x4

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: <Self as SimdConsts>::Scalar) -> Self

Performs the | operation. Read more
Source§

impl BitOr for F32x4

Source§

type Output = F32x4

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: Self) -> Self

Performs the | operation. Read more
Source§

impl BitOrAssign<<F32x4 as SimdConsts>::Scalar> for F32x4

Source§

fn bitor_assign(&mut self, rhs: <Self as SimdConsts>::Scalar)

Performs the |= operation. Read more
Source§

impl BitOrAssign for F32x4

Source§

fn bitor_assign(&mut self, rhs: Self)

Performs the |= operation. Read more
Source§

impl BitXor<<F32x4 as SimdConsts>::Scalar> for F32x4

Source§

type Output = F32x4

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: <Self as SimdConsts>::Scalar) -> Self

Performs the ^ operation. Read more
Source§

impl BitXor for F32x4

Source§

type Output = F32x4

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: Self) -> Self

Performs the ^ operation. Read more
Source§

impl BitXorAssign<<F32x4 as SimdConsts>::Scalar> for F32x4

Source§

fn bitxor_assign(&mut self, rhs: <Self as SimdConsts>::Scalar)

Performs the ^= operation. Read more
Source§

impl BitXorAssign for F32x4

Source§

fn bitxor_assign(&mut self, rhs: Self)

Performs the ^= operation. Read more
Source§

impl Clone for F32x4

Source§

fn clone(&self) -> F32x4

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for F32x4

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Div<<F32x4 as SimdConsts>::Scalar> for F32x4

Source§

type Output = F32x4

The resulting type after applying the / operator.
Source§

fn div(self, rhs: <Self as SimdConsts>::Scalar) -> Self

Performs the / operation. Read more
Source§

impl Div for F32x4

Source§

type Output = F32x4

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Self) -> Self

Performs the / operation. Read more
Source§

impl DivAssign<<F32x4 as SimdConsts>::Scalar> for F32x4

Source§

fn div_assign(&mut self, rhs: <Self as SimdConsts>::Scalar)

Performs the /= operation. Read more
Source§

impl DivAssign for F32x4

Source§

fn div_assign(&mut self, rhs: Self)

Performs the /= operation. Read more
Source§

impl Index<usize> for F32x4

Source§

type Output = <F32x4 as SimdConsts>::Scalar

The returned type after indexing.
Source§

fn index(&self, index: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl IndexMut<usize> for F32x4

Source§

fn index_mut(&mut self, index: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl Mul<<F32x4 as SimdConsts>::Scalar> for F32x4

Source§

type Output = F32x4

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: <Self as SimdConsts>::Scalar) -> Self

Performs the * operation. Read more
Source§

impl Mul<F32x4> for <F32x4 as SimdConsts>::Scalar

Source§

type Output = F32x4

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: F32x4) -> F32x4

Performs the * operation. Read more
Source§

impl Mul for F32x4

Source§

type Output = F32x4

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Self) -> Self

Performs the * operation. Read more
Source§

impl MulAssign<<F32x4 as SimdConsts>::Scalar> for F32x4

Source§

fn mul_assign(&mut self, rhs: <Self as SimdConsts>::Scalar)

Performs the *= operation. Read more
Source§

impl MulAssign for F32x4

Source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
Source§

impl Neg for F32x4

Source§

type Output = F32x4

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self

Performs the unary - operation. Read more
Source§

impl Not for F32x4

Source§

type Output = F32x4

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self

Performs the unary ! operation. Read more
Source§

impl SimdBaseIo for F32x4

Source§

fn zeroes() -> Self

Initialize a vector with all elements set to zero
Source§

fn set1(x: Self::Scalar) -> Self

Initialize a vector with all elements set to the same value
Source§

unsafe fn load_from_array(array: Self::ArrayRepresentation) -> Self

Source§

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)

Store a vector to an unaligned raw pointer.
Source§

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)

Store a vector to a 32 bit aligned raw pointer.
Source§

unsafe fn underlying_value(self) -> Self::UnderlyingType

Source§

unsafe fn underlying_value_mut(&mut self) -> &mut Self::UnderlyingType

Source§

unsafe fn from_underlying_value(value: Self::UnderlyingType) -> Self

Source§

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

Transmutes the vector into a mutable array representation defined by Self::ArrayRepresentation. Please don’t use this function directly unless necessary.
Source§

unsafe fn as_array(&self) -> Self::ArrayRepresentation

Source§

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

Gets the value at the specified index, without a bounds check.
Source§

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

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>

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])

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

Source§

fn add(self, rhs: Self) -> Self

Element-wise add between two vectors
Source§

fn sub(self, rhs: Self) -> Self

Element-wise subtract between two vectors
Source§

fn mul(self, rhs: Self) -> Self

Element-wise multiply between two vectors
Source§

fn bit_and(self, rhs: Self) -> Self

Binary and between two vectors
Source§

fn bit_or(self, rhs: Self) -> Self

Binary or between two vectors
Source§

fn bit_xor(self, rhs: Self) -> Self

Binary xor between two vectors
Source§

fn bit_not(self) -> Self

Binary not operation for a vector
Source§

fn abs(self) -> Self

Element-wise absolute value. Read more
Source§

fn and_not(self, rhs: Self) -> Self

Binary and not between two vectors self & (!rhs)
Source§

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

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

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

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

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

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

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 max(self, rhs: Self) -> Self

Element-wise maximum between two vectors. Read more
Source§

fn min(self, rhs: Self) -> Self

Element-wise minimum between two vectors. Read more
Source§

fn horizontal_add(self) -> Self::HorizontalAddScalar

Add every number in the vector together
Source§

fn neg(self) -> Self

Element-wise negative of all elements
Source§

impl SimdConsts for F32x4

Source§

const WIDTH: usize = 4

Source§

type Scalar = f32

Source§

type HorizontalAddScalar = f32

Source§

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

The underlying intrinsic SIMD type.
Source§

type Engine = Sse2

Source§

impl SimdFloat for F32x4

Source§

fn div(self, rhs: Self) -> Self

Element-wise divide between two vectors
Source§

fn ceil(self) -> Self

Element-wise ceilings between two vectors
Source§

fn floor(self) -> Self

Element-wise floors between two vectors
Source§

fn round(self) -> Self

Element-wise rounds between two vectors
Source§

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

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

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

Element-wise multiply add. This performs Self * A + B
Source§

fn mul_sub(self, a: Self, b: Self) -> Self

Element-wise multiply subtract. This performs Self * A - B
Source§

fn neg_mul_add(self, a: Self, b: Self) -> Self

Element-wise negative multiply add. This performs -(Self * A) + B
Source§

fn neg_mul_sub(self, a: Self, b: Self) -> Self

Element-wise negative multiply subtract. This performs -(Self * A) - B
Source§

fn sqrt(self) -> Self

Element-wise square root
Source§

fn rsqrt(self) -> Self

Element-wise approximate inverse square root. Read more
Source§

fn from_f64(value: f64) -> Self

Source§

impl SimdFloat32 for F32x4

Source§

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

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

Element-wise fast reciprocal (1.0 / x)
Source§

impl SimdTransmuteF32 for F32x4

Source§

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

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

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

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

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

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

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

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

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

Tries to create the value from its underlying Avx512 type. Panics if the value is not a Avx512.
Source§

impl Sub<<F32x4 as SimdConsts>::Scalar> for F32x4

Source§

type Output = F32x4

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: <Self as SimdConsts>::Scalar) -> Self

Performs the - operation. Read more
Source§

impl Sub<F32x4> for <F32x4 as SimdConsts>::Scalar

Source§

type Output = F32x4

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: F32x4) -> F32x4

Performs the - operation. Read more
Source§

impl Sub for F32x4

Source§

type Output = F32x4

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self

Performs the - operation. Read more
Source§

impl SubAssign<<F32x4 as SimdConsts>::Scalar> for F32x4

Source§

fn sub_assign(&mut self, rhs: <Self as SimdConsts>::Scalar)

Performs the -= operation. Read more
Source§

impl SubAssign for F32x4

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
Source§

impl 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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> SimdIter for T
where T: SimdBaseIo,

Source§

fn iter(&self) -> SimdArrayIterator<'_, Self>

Source§

fn iter_mut(&mut self) -> SimdArrayMutIterator<'_, Self>

Source§

impl<T> SimdMathF32BinaryMisc for T
where T: SimdFloat32,

Source§

fn log10_u35(self) -> Self
where Self::Engine: Simd<Vf32 = Self>,

Source§

fn atan2_u35(self, x: Self) -> Self
where Self::Engine: Simd<Vf32 = Self>,

Source§

fn hypot_u35(self, y: Self) -> Self
where Self::Engine: Simd<Vf32 = Self>,

Source§

fn fmod(self, y: Self) -> Self

Floating-point remainder with C/libm fmod semantics (sign follows dividend).
Source§

impl<T> SimdMathF32Core for T
where T: SimdFloat32,

Source§

fn log2_u35(self) -> Self
where Self::Engine: Simd<Vf32 = Self>,

Source§

fn exp2_u35(self) -> Self
where Self::Engine: Simd<Vf32 = Self>,

Source§

fn ln_u35(self) -> Self

Source§

fn exp_u35(self) -> Self

Source§

fn sin_u35(self) -> Self
where Self::Engine: Simd<Vf32 = Self>,

Source§

fn cos_u35(self) -> Self
where Self::Engine: Simd<Vf32 = Self>,

Source§

fn tan_u35(self) -> Self
where Self::Engine: Simd<Vf32 = Self>,

Source§

impl<T> SimdMathF32Hyperbolic for T
where T: SimdFloat32,

Source§

fn sinh_u35(self) -> Self
where Self::Engine: Simd<Vf32 = Self>,

Source§

fn cosh_u35(self) -> Self
where Self::Engine: Simd<Vf32 = Self>,

Source§

fn tanh_u35(self) -> Self
where Self::Engine: Simd<Vf32 = Self>,

Source§

impl<T> SimdMathF32InverseHyperbolic for T
where T: SimdFloat32,

Source§

fn asinh_u35(self) -> Self
where Self::Engine: Simd<Vf32 = Self>,

Source§

fn acosh_u35(self) -> Self
where Self::Engine: Simd<Vf32 = Self>,

Source§

fn atanh_u35(self) -> Self
where Self::Engine: Simd<Vf32 = Self>,

Source§

impl<T> SimdMathF32InverseTrig for T
where T: SimdFloat32,

Source§

fn asin_u35(self) -> Self
where Self::Engine: Simd<Vf32 = Self>,

Source§

fn acos_u35(self) -> Self
where Self::Engine: Simd<Vf32 = Self>,

Source§

fn atan_u35(self) -> Self
where Self::Engine: Simd<Vf32 = Self>,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> SimdBase for T

Source§

impl<T> SimdMathF32 for T