pub struct I8x1(pub i8);Tuple Fields§
§0: i8Trait Implementations§
Source§impl AddAssign<<I8x1 as SimdConsts>::Scalar> for I8x1
impl AddAssign<<I8x1 as SimdConsts>::Scalar> for I8x1
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 I8x1
impl AddAssign for I8x1
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl BitAndAssign<<I8x1 as SimdConsts>::Scalar> for I8x1
impl BitAndAssign<<I8x1 as SimdConsts>::Scalar> for I8x1
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 I8x1
impl BitAndAssign for I8x1
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
Performs the
&= operation. Read moreSource§impl BitOrAssign<<I8x1 as SimdConsts>::Scalar> for I8x1
impl BitOrAssign<<I8x1 as SimdConsts>::Scalar> for I8x1
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 I8x1
impl BitOrAssign for I8x1
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the
|= operation. Read moreSource§impl BitXorAssign<<I8x1 as SimdConsts>::Scalar> for I8x1
impl BitXorAssign<<I8x1 as SimdConsts>::Scalar> for I8x1
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 I8x1
impl BitXorAssign for I8x1
Source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
Performs the
^= operation. Read moreSource§impl MulAssign<<I8x1 as SimdConsts>::Scalar> for I8x1
impl MulAssign<<I8x1 as SimdConsts>::Scalar> for I8x1
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 I8x1
impl MulAssign for I8x1
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*= operation. Read moreSource§impl ShlAssign<i32> for I8x1
impl ShlAssign<i32> for I8x1
Source§fn shl_assign(&mut self, rhs: i32)
fn shl_assign(&mut self, rhs: i32)
Performs the
<<= operation. Read moreSource§impl ShrAssign<i32> for I8x1
impl ShrAssign<i32> for I8x1
Source§fn shr_assign(&mut self, rhs: i32)
fn shr_assign(&mut self, rhs: i32)
Performs the
>>= operation. Read moreSource§impl SimdBaseIo for I8x1
impl SimdBaseIo for I8x1
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 I8x1
impl SimdBaseOps for I8x1
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 I8x1
impl SimdConsts for I8x1
const WIDTH: usize = 1usize
type Scalar = i8
type HorizontalAddScalar = i64
Source§type ArrayRepresentation = [i8; 1]
type ArrayRepresentation = [i8; 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 = i8
type UnderlyingType = i8
The underlying intrinsic SIMD type.
type Engine = Scalar
Source§impl SimdInt for I8x1
impl SimdInt for I8x1
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 SimdInt8 for I8x1
impl SimdInt8 for I8x1
Source§fn extend_to_i16(
self,
) -> (<Self::Engine as Simd>::Vi16, <Self::Engine as Simd>::Vi16)
fn extend_to_i16( self, ) -> (<Self::Engine as Simd>::Vi16, <Self::Engine as Simd>::Vi16)
Splits the vector into two halves, then extends them both to be i16. This is useful for horizontal adding.
Source§fn unsigned_extend_to_i16(
self,
) -> (<Self::Engine as Simd>::Vi16, <Self::Engine as Simd>::Vi16)
fn unsigned_extend_to_i16( self, ) -> (<Self::Engine as Simd>::Vi16, <Self::Engine as Simd>::Vi16)
Splits the vector into two halves, then extends them both to be i16. 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 get_mask(self) -> u32
fn get_mask(self) -> u32
Gets the “mask” of a vector, where each bit in the u32 represents whether the value at that location
is truthy. A value is truthy either if the highest bit is one, or if any bit is one, depending
on the instruction set being used. Please always make sure at least the highest bit is set to 1.
Source§fn is_truthy(self) -> bool
fn is_truthy(self) -> bool
Checks if all elements in the vector are truthy. A value is truthy either if the highest bit is one, or if any bit is one,
depending on the instruction set being used. Please always make sure at least the highest bit is set to 1.
Source§fn partial_horizontal_add(self) -> <Self::Engine as Simd>::Vi16
fn partial_horizontal_add(self) -> <Self::Engine as Simd>::Vi16
Adds (arbitrary) pairs of values in the vector, returning a i16 version of the vector.
The way the pairs are chosen is implementation-defined.
Source§fn partial_horizontal_unsigned_add(self) -> <Self::Engine as Simd>::Vi16
fn partial_horizontal_unsigned_add(self) -> <Self::Engine as Simd>::Vi16
Adds (arbitrary) pairs of values in the vector, returning a i16 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§fn is_any_truthy(self) -> bool
fn is_any_truthy(self) -> bool
Checks if any element in the vector is truthy. A value is truthy either if the highest bit is one, or if any bit is one,
depending on the instruction set being used. Please always make sure at least the highest bit is set to 1.
Source§fn index_of_last_truthy(self) -> Option<usize>
fn index_of_last_truthy(self) -> Option<usize>
Grabs the index of the last value that matches the given value. If no value matches, returns None.
Index will always be smaller than Self::WIDTH.
Source§fn index_of_last_falsy(self) -> Option<usize>
fn index_of_last_falsy(self) -> Option<usize>
Grabs the index of the last value that matches the given value. If no value matches, returns None.
Index will always be smaller than Self::WIDTH.
Source§fn index_of_first_truthy(self) -> Option<usize>
fn index_of_first_truthy(self) -> Option<usize>
Grabs the index of the first value that matches the given value. If no value matches, returns None.
Index will always be smaller than Self::WIDTH.
Source§fn index_of_first_falsy(self) -> Option<usize>
fn index_of_first_falsy(self) -> Option<usize>
Grabs the index of the first value that matches the given value. If no value matches, returns None.
Index will always be smaller than Self::WIDTH.
Source§impl SimdTransmuteI8 for I8x1
impl SimdTransmuteI8 for I8x1
Source§fn try_transmute_scalar(&self) -> i8
fn try_transmute_scalar(&self) -> i8
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: i8) -> Self
fn try_transmute_from_scalar(val: i8) -> 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<<I8x1 as SimdConsts>::Scalar> for I8x1
impl SubAssign<<I8x1 as SimdConsts>::Scalar> for I8x1
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 I8x1
impl SubAssign for I8x1
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreimpl Copy for I8x1
Auto Trait Implementations§
impl Freeze for I8x1
impl RefUnwindSafe for I8x1
impl Send for I8x1
impl Sync for I8x1
impl Unpin for I8x1
impl UnwindSafe for I8x1
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