I8x1

Struct I8x1 

Source
pub struct I8x1(pub i8);

Tuple Fields§

§0: i8

Trait Implementations§

Source§

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

Source§

type Output = I8x1

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<I8x1> for <I8x1 as SimdConsts>::Scalar

Source§

type Output = I8x1

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add for I8x1

Source§

type Output = I8x1

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

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

Source§

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

Performs the += operation. Read more
Source§

impl AddAssign for I8x1

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

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

Source§

type Output = I8x1

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 I8x1

Source§

type Output = I8x1

The resulting type after applying the & operator.
Source§

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

Performs the & operation. Read more
Source§

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

Source§

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

Performs the &= operation. Read more
Source§

impl BitAndAssign for I8x1

Source§

fn bitand_assign(&mut self, rhs: Self)

Performs the &= operation. Read more
Source§

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

Source§

type Output = I8x1

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 I8x1

Source§

type Output = I8x1

The resulting type after applying the | operator.
Source§

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

Performs the | operation. Read more
Source§

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

Source§

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

Performs the |= operation. Read more
Source§

impl BitOrAssign for I8x1

Source§

fn bitor_assign(&mut self, rhs: Self)

Performs the |= operation. Read more
Source§

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

Source§

type Output = I8x1

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 I8x1

Source§

type Output = I8x1

The resulting type after applying the ^ operator.
Source§

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

Performs the ^ operation. Read more
Source§

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

Source§

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

Performs the ^= operation. Read more
Source§

impl BitXorAssign for I8x1

Source§

fn bitxor_assign(&mut self, rhs: Self)

Performs the ^= operation. Read more
Source§

impl Clone for I8x1

Source§

fn clone(&self) -> I8x1

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 I8x1

Source§

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

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

impl From<I8x1> for i8

Source§

fn from(v: I8x1) -> i8

Converts to this type from the input type.
Source§

impl From<i8> for I8x1

Source§

fn from(val: i8) -> Self

Converts to this type from the input type.
Source§

impl Index<usize> for I8x1

Source§

type Output = <I8x1 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 I8x1

Source§

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

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

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

Source§

type Output = I8x1

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<I8x1> for <I8x1 as SimdConsts>::Scalar

Source§

type Output = I8x1

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul for I8x1

Source§

type Output = I8x1

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

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

Source§

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

Performs the *= operation. Read more
Source§

impl MulAssign for I8x1

Source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
Source§

impl Neg for I8x1

Source§

type Output = I8x1

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self

Performs the unary - operation. Read more
Source§

impl Not for I8x1

Source§

type Output = I8x1

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self

Performs the unary ! operation. Read more
Source§

impl Shl<i32> for I8x1

Source§

type Output = I8x1

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: i32) -> Self

Performs the << operation. Read more
Source§

impl ShlAssign<i32> for I8x1

Source§

fn shl_assign(&mut self, rhs: i32)

Performs the <<= operation. Read more
Source§

impl Shr<i32> for I8x1

Source§

type Output = I8x1

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: i32) -> Self

Performs the >> operation. Read more
Source§

impl ShrAssign<i32> for I8x1

Source§

fn shr_assign(&mut self, rhs: i32)

Performs the >>= operation. Read more
Source§

impl SimdBaseIo for I8x1

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 I8x1

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
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.
Source§

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

Element-wise minimum between two vectors.
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 I8x1

Source§

const WIDTH: usize = 1usize

Source§

type Scalar = i8

Source§

type HorizontalAddScalar = i64

Source§

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

The underlying intrinsic SIMD type.
Source§

type Engine = Scalar

Source§

impl SimdInt for I8x1

Source§

fn shl(self, rhs: i32) -> Self

Shift each value left by n bits. Read more
Source§

fn shr(self, rhs: i32) -> Self

Shift each value right by n bits. Read more
Source§

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

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

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.
Source§

fn from_i64(value: i64) -> Self

Source§

impl SimdInt8 for I8x1

Source§

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)

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

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

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

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

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

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>

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>

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>

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>

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_eq(self, value: i8) -> 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

Source§

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

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

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

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

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

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

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

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

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

Source§

type Output = I8x1

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<I8x1> for <I8x1 as SimdConsts>::Scalar

Source§

type Output = I8x1

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub for I8x1

Source§

type Output = I8x1

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

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

Source§

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

Performs the -= operation. Read more
Source§

impl SubAssign for I8x1

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
Source§

impl 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> 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> 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