pub struct I16x16(/* private fields */);Trait Implementations§
Source§impl AddAssign<<I16x16 as SimdConsts>::Scalar> for I16x16
impl AddAssign<<I16x16 as SimdConsts>::Scalar> for I16x16
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 I16x16
impl AddAssign for I16x16
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl BitAndAssign<<I16x16 as SimdConsts>::Scalar> for I16x16
impl BitAndAssign<<I16x16 as SimdConsts>::Scalar> for I16x16
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 I16x16
impl BitAndAssign for I16x16
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
Performs the
&= operation. Read moreSource§impl BitOrAssign<<I16x16 as SimdConsts>::Scalar> for I16x16
impl BitOrAssign<<I16x16 as SimdConsts>::Scalar> for I16x16
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 I16x16
impl BitOrAssign for I16x16
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the
|= operation. Read moreSource§impl BitXorAssign<<I16x16 as SimdConsts>::Scalar> for I16x16
impl BitXorAssign<<I16x16 as SimdConsts>::Scalar> for I16x16
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 I16x16
impl BitXorAssign for I16x16
Source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
Performs the
^= operation. Read moreSource§impl MulAssign<<I16x16 as SimdConsts>::Scalar> for I16x16
impl MulAssign<<I16x16 as SimdConsts>::Scalar> for I16x16
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 I16x16
impl MulAssign for I16x16
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*= operation. Read moreSource§impl ShlAssign<i32> for I16x16
impl ShlAssign<i32> for I16x16
Source§fn shl_assign(&mut self, rhs: i32)
fn shl_assign(&mut self, rhs: i32)
Performs the
<<= operation. Read moreSource§impl ShrAssign<i32> for I16x16
impl ShrAssign<i32> for I16x16
Source§fn shr_assign(&mut self, rhs: i32)
fn shr_assign(&mut self, rhs: i32)
Performs the
>>= operation. Read moreSource§impl SimdBaseIo for I16x16
impl SimdBaseIo for I16x16
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 I16x16
impl SimdBaseOps for I16x16
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 I16x16
impl SimdConsts for I16x16
const WIDTH: usize = 16
type Scalar = i16
type HorizontalAddScalar = i64
Source§type ArrayRepresentation = [i16; 16]
type ArrayRepresentation = [i16; 16]
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 = __m256i
type UnderlyingType = __m256i
The underlying intrinsic SIMD type.
type Engine = Avx2
Source§impl SimdInt for I16x16
impl SimdInt for I16x16
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 SimdInt16 for I16x16
impl SimdInt16 for I16x16
Source§fn extend_to_i32(
self,
) -> (<Self::Engine as Simd>::Vi32, <Self::Engine as Simd>::Vi32)
fn extend_to_i32( self, ) -> (<Self::Engine as Simd>::Vi32, <Self::Engine as Simd>::Vi32)
Splits the vector into two halves, then extends them both to be i32. This is useful for horizontal adding.
Source§fn unsigned_extend_to_i32(
self,
) -> (<Self::Engine as Simd>::Vi32, <Self::Engine as Simd>::Vi32)
fn unsigned_extend_to_i32( self, ) -> (<Self::Engine as Simd>::Vi32, <Self::Engine as Simd>::Vi32)
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>::Vi32
fn partial_horizontal_add(self) -> <Self::Engine as Simd>::Vi32
Adds (arbitrary) pairs of values in the vector, returning a i32 version of the vector.
The way the pairs are chosen is implementation-defined.
Source§fn partial_horizontal_unsigned_add(self) -> <Self::Engine as Simd>::Vi32
fn partial_horizontal_unsigned_add(self) -> <Self::Engine as Simd>::Vi32
Adds (arbitrary) pairs of values in the vector, returning a i32 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 SimdTransmuteI16 for I16x16
impl SimdTransmuteI16 for I16x16
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(val: __m256i) -> Self
fn try_transmute_from_avx2(val: __m256i) -> Self
Tries to create the value from its underlying Avx2 type. Panics if the value is not a Avx2.
Source§fn try_transmute_scalar(&self) -> i16
fn try_transmute_scalar(&self) -> i16
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: i16) -> Self
fn try_transmute_from_scalar(_scalar: i16) -> 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_avx512(&self) -> __m512i
fn try_transmute_avx512(&self) -> __m512i
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: __m512i) -> Self
fn try_transmute_from_avx512(_avx512: __m512i) -> Self
Tries to create the value from its underlying Avx512 type. Panics if the value is not a Avx512.
Source§impl SubAssign<<I16x16 as SimdConsts>::Scalar> for I16x16
impl SubAssign<<I16x16 as SimdConsts>::Scalar> for I16x16
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 I16x16
impl SubAssign for I16x16
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreimpl Copy for I16x16
Auto Trait Implementations§
impl Freeze for I16x16
impl RefUnwindSafe for I16x16
impl Send for I16x16
impl Sync for I16x16
impl Unpin for I16x16
impl UnsafeUnpin for I16x16
impl UnwindSafe for I16x16
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