pub struct I32x1(pub i32);Tuple Fields§
§0: i32Trait Implementations§
Source§impl AddAssign<<I32x1 as SimdConsts>::Scalar> for I32x1
impl AddAssign<<I32x1 as SimdConsts>::Scalar> for I32x1
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 I32x1
impl AddAssign for I32x1
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl BitAndAssign<<I32x1 as SimdConsts>::Scalar> for I32x1
impl BitAndAssign<<I32x1 as SimdConsts>::Scalar> for I32x1
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 I32x1
impl BitAndAssign for I32x1
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
Performs the
&= operation. Read moreSource§impl BitOrAssign<<I32x1 as SimdConsts>::Scalar> for I32x1
impl BitOrAssign<<I32x1 as SimdConsts>::Scalar> for I32x1
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 I32x1
impl BitOrAssign for I32x1
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the
|= operation. Read moreSource§impl BitXorAssign<<I32x1 as SimdConsts>::Scalar> for I32x1
impl BitXorAssign<<I32x1 as SimdConsts>::Scalar> for I32x1
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 I32x1
impl BitXorAssign for I32x1
Source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
Performs the
^= operation. Read moreSource§impl MulAssign<<I32x1 as SimdConsts>::Scalar> for I32x1
impl MulAssign<<I32x1 as SimdConsts>::Scalar> for I32x1
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 I32x1
impl MulAssign for I32x1
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*= operation. Read moreSource§impl ShlAssign<i32> for I32x1
impl ShlAssign<i32> for I32x1
Source§fn shl_assign(&mut self, rhs: i32)
fn shl_assign(&mut self, rhs: i32)
Performs the
<<= operation. Read moreSource§impl ShrAssign<i32> for I32x1
impl ShrAssign<i32> for I32x1
Source§fn shr_assign(&mut self, rhs: i32)
fn shr_assign(&mut self, rhs: i32)
Performs the
>>= operation. Read moreSource§impl SimdBaseIo for I32x1
impl SimdBaseIo for I32x1
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 I32x1
impl SimdBaseOps for I32x1
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 I32x1
impl SimdConsts for I32x1
const WIDTH: usize = 1usize
type Scalar = i32
type HorizontalAddScalar = i64
Source§type ArrayRepresentation = [i32; 1]
type ArrayRepresentation = [i32; 1]
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 = i32
type UnderlyingType = i32
The underlying intrinsic SIMD type.
type Engine = Scalar
Source§impl SimdInt for I32x1
impl SimdInt for I32x1
Source§fn shl_const<const BY: i32>(self) -> Self
fn shl_const<const BY: i32>(self) -> Self
Shift each value left by a constant n bits. This operation is faster in some instruction sets. Read more
Source§fn shr_const<const BY: i32>(self) -> Self
fn shr_const<const BY: i32>(self) -> Self
Shift each value right by a constant n bits. This operation is faster in some instruction sets. Read more
Source§fn horizontal_unsigned_add(self) -> Self::HorizontalAddScalar
fn horizontal_unsigned_add(self) -> Self::HorizontalAddScalar
Add every number in the vector together in unsigned arithmetic. When expanding the size of each number,
it treats the numbers as unsigned, meaning the sign bit doesn’t get moved around.
fn from_i64(value: i64) -> Self
Source§impl SimdInt32 for I32x1
impl SimdInt32 for I32x1
Source§fn bitcast_f32(self) -> <Self::Engine as Simd>::Vf32
fn bitcast_f32(self) -> <Self::Engine as Simd>::Vf32
Bit cast to f32.
This function is only used for compilation and does not generate any instructions, thus it has zero latency.
Source§fn extend_to_i64(
self,
) -> (<Self::Engine as Simd>::Vi64, <Self::Engine as Simd>::Vi64)
fn extend_to_i64( self, ) -> (<Self::Engine as Simd>::Vi64, <Self::Engine as Simd>::Vi64)
Splits the vector into two halves, then extends them both to be i64. This is useful for horizontal adding.
Source§fn unsigned_extend_to_i64(
self,
) -> (<Self::Engine as Simd>::Vi64, <Self::Engine as Simd>::Vi64)
fn unsigned_extend_to_i64( self, ) -> (<Self::Engine as Simd>::Vi64, <Self::Engine as Simd>::Vi64)
Splits the vector into two halves, then extends them both to be i32. This is useful for horizontal adding.
The numbers are treated as unsigned, so the sign bit isn’t moved. This is more efficient on some instruction sets.
Source§fn partial_horizontal_add(self) -> <Self::Engine as Simd>::Vi64
fn partial_horizontal_add(self) -> <Self::Engine as Simd>::Vi64
Adds (arbitrary) pairs of values in the vector, returning a i64 version of the vector.
The way the pairs are chosen is implementation-defined.
Source§fn partial_horizontal_unsigned_add(self) -> <Self::Engine as Simd>::Vi64
fn partial_horizontal_unsigned_add(self) -> <Self::Engine as Simd>::Vi64
Adds (arbitrary) pairs of values in the vector, returning a i64 version of the vector.
When extending the numbers, they’re treated as unsigned wich performs more efficiently on some instruction sets.
The way the pairs are chosen is implementation-defined.
Source§impl SimdTransmuteI32 for I32x1
impl SimdTransmuteI32 for I32x1
Source§fn try_transmute_scalar(&self) -> i32
fn try_transmute_scalar(&self) -> i32
Tries to transmute the value into its underlying scalar type. Panics if the value is not a scalar.
Source§fn try_transmute_from_scalar(val: i32) -> Self
fn try_transmute_from_scalar(val: i32) -> Self
Tries to create the value from its underlying scalar type. Panics if the value is not a scalar.
Source§fn try_transmute_sse2(&self) -> __m128i
fn try_transmute_sse2(&self) -> __m128i
Tries to transmute the value into its underlying Sse2 type. Panics if the value is not a Sse2.
Source§fn try_transmute_from_sse2(_sse2: __m128i) -> Self
fn try_transmute_from_sse2(_sse2: __m128i) -> Self
Tries to create the value from its underlying Sse2 type. Panics if the value is not a Sse2.
Source§fn try_transmute_sse41(&self) -> __m128i
fn try_transmute_sse41(&self) -> __m128i
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: __m128i) -> Self
fn try_transmute_from_sse41(_sse41: __m128i) -> 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) -> __m256i
fn try_transmute_avx2(&self) -> __m256i
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: __m256i) -> Self
fn try_transmute_from_avx2(_avx2: __m256i) -> Self
Tries to create the value from its underlying Avx2 type. Panics if the value is not a Avx2.
Source§impl SubAssign<<I32x1 as SimdConsts>::Scalar> for I32x1
impl SubAssign<<I32x1 as SimdConsts>::Scalar> for I32x1
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 I32x1
impl SubAssign for I32x1
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreimpl Copy for I32x1
Auto Trait Implementations§
impl Freeze for I32x1
impl RefUnwindSafe for I32x1
impl Send for I32x1
impl Sync for I32x1
impl Unpin for I32x1
impl UnwindSafe for I32x1
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