pub type i16x2 = Simd<i16, 2>;
portable_simd
#86656)Expand description
A SIMD vector with two elements of type i16
.
Aliased Type§
struct i16x2(/* private fields */);
Implementations§
source§impl<T, const LANES: usize> Simd<T, LANES>where
T: SimdElement,
LaneCount<LANES>: SupportedLaneCount,
impl<T, const LANES: usize> Simd<T, LANES>where T: SimdElement, LaneCount<LANES>: SupportedLaneCount,
sourcepub fn reverse(self) -> Self
🔬This is a nightly-only experimental API. (portable_simd
#86656)
pub fn reverse(self) -> Self
portable_simd
#86656)Reverse the order of the lanes in the vector.
sourcepub fn rotate_lanes_left<const OFFSET: usize>(self) -> Self
🔬This is a nightly-only experimental API. (portable_simd
#86656)
pub fn rotate_lanes_left<const OFFSET: usize>(self) -> Self
portable_simd
#86656)Rotates the vector such that the first OFFSET
elements of the slice move to the end
while the last LANES - OFFSET
elements move to the front. After calling rotate_lanes_left
,
the element previously in lane OFFSET
will become the first element in the slice.
sourcepub fn rotate_lanes_right<const OFFSET: usize>(self) -> Self
🔬This is a nightly-only experimental API. (portable_simd
#86656)
pub fn rotate_lanes_right<const OFFSET: usize>(self) -> Self
portable_simd
#86656)Rotates the vector such that the first LANES - OFFSET
elements of the vector move to
the end while the last OFFSET
elements move to the front. After calling rotate_lanes_right
,
the element previously at index LANES - OFFSET
will become the first element in the slice.
sourcepub fn interleave(self, other: Self) -> (Self, Self)
🔬This is a nightly-only experimental API. (portable_simd
#86656)
pub fn interleave(self, other: Self) -> (Self, Self)
portable_simd
#86656)Interleave two vectors.
The resulting vectors contain lanes taken alternatively from self
and other
, first
filling the first result, and then the second.
The reverse of this operation is Simd::deinterleave
.
let a = Simd::from_array([0, 1, 2, 3]);
let b = Simd::from_array([4, 5, 6, 7]);
let (x, y) = a.interleave(b);
assert_eq!(x.to_array(), [0, 4, 1, 5]);
assert_eq!(y.to_array(), [2, 6, 3, 7]);
Runsourcepub fn deinterleave(self, other: Self) -> (Self, Self)
🔬This is a nightly-only experimental API. (portable_simd
#86656)
pub fn deinterleave(self, other: Self) -> (Self, Self)
portable_simd
#86656)Deinterleave two vectors.
The first result takes every other lane of self
and then other
, starting with
the first lane.
The second result takes every other lane of self
and then other
, starting with
the second lane.
The reverse of this operation is Simd::interleave
.
let a = Simd::from_array([0, 4, 1, 5]);
let b = Simd::from_array([2, 6, 3, 7]);
let (x, y) = a.deinterleave(b);
assert_eq!(x.to_array(), [0, 1, 2, 3]);
assert_eq!(y.to_array(), [4, 5, 6, 7]);
Runsource§impl<T, const N: usize> Simd<T, N>where
LaneCount<N>: SupportedLaneCount,
T: SimdElement,
impl<T, const N: usize> Simd<T, N>where LaneCount<N>: SupportedLaneCount, T: SimdElement,
sourcepub const LANES: usize = N
🔬This is a nightly-only experimental API. (portable_simd
#86656)
pub const LANES: usize = N
portable_simd
#86656)Number of elements in this vector.
sourcepub const fn lanes<const host: bool = true>(&self) -> usize
🔬This is a nightly-only experimental API. (portable_simd
#86656)
pub const fn lanes<const host: bool = true>(&self) -> usize
portable_simd
#86656)sourcepub fn splat(value: T) -> Self
🔬This is a nightly-only experimental API. (portable_simd
#86656)
pub fn splat(value: T) -> Self
portable_simd
#86656)sourcepub const fn as_array<const host: bool = true>(&self) -> &[T; N]
🔬This is a nightly-only experimental API. (portable_simd
#86656)
pub const fn as_array<const host: bool = true>(&self) -> &[T; N]
portable_simd
#86656)sourcepub fn as_mut_array(&mut self) -> &mut [T; N]
🔬This is a nightly-only experimental API. (portable_simd
#86656)
pub fn as_mut_array(&mut self) -> &mut [T; N]
portable_simd
#86656)Returns a mutable array reference containing the entire SIMD vector.
sourcepub const fn from_array<const host: bool = true>(array: [T; N]) -> Self
🔬This is a nightly-only experimental API. (portable_simd
#86656)
pub const fn from_array<const host: bool = true>(array: [T; N]) -> Self
portable_simd
#86656)Converts an array to a SIMD vector.
sourcepub const fn to_array<const host: bool = true>(self) -> [T; N]
🔬This is a nightly-only experimental API. (portable_simd
#86656)
pub const fn to_array<const host: bool = true>(self) -> [T; N]
portable_simd
#86656)Converts a SIMD vector to an array.
sourcepub const fn from_slice<const host: bool = true>(slice: &[T]) -> Self
🔬This is a nightly-only experimental API. (portable_simd
#86656)
pub const fn from_slice<const host: bool = true>(slice: &[T]) -> Self
portable_simd
#86656)sourcepub fn copy_to_slice(self, slice: &mut [T])
🔬This is a nightly-only experimental API. (portable_simd
#86656)
pub fn copy_to_slice(self, slice: &mut [T])
portable_simd
#86656)sourcepub fn gather_or(slice: &[T], idxs: Simd<usize, N>, or: Self) -> Self
🔬This is a nightly-only experimental API. (portable_simd
#86656)
pub fn gather_or(slice: &[T], idxs: Simd<usize, N>, or: Self) -> Self
portable_simd
#86656)Reads from potentially discontiguous indices in slice
to construct a SIMD vector.
If an index is out-of-bounds, the element is instead selected from the or
vector.
Examples
let vec: Vec<i32> = vec![10, 11, 12, 13, 14, 15, 16, 17, 18];
let idxs = Simd::from_array([9, 3, 0, 5]); // Note the index that is out-of-bounds
let alt = Simd::from_array([-5, -4, -3, -2]);
let result = Simd::gather_or(&vec, idxs, alt);
assert_eq!(result, Simd::from_array([-5, 13, 10, 15]));
Runsourcepub fn gather_or_default(slice: &[T], idxs: Simd<usize, N>) -> Selfwhere
T: Default,
🔬This is a nightly-only experimental API. (portable_simd
#86656)
pub fn gather_or_default(slice: &[T], idxs: Simd<usize, N>) -> Selfwhere T: Default,
portable_simd
#86656)Reads from indices in slice
to construct a SIMD vector.
If an index is out-of-bounds, the element is set to the default given by T: Default
.
Examples
let vec: Vec<i32> = vec![10, 11, 12, 13, 14, 15, 16, 17, 18];
let idxs = Simd::from_array([9, 3, 0, 5]); // Note the index that is out-of-bounds
let result = Simd::gather_or_default(&vec, idxs);
assert_eq!(result, Simd::from_array([0, 13, 10, 15]));
Runsourcepub fn gather_select(
slice: &[T],
enable: Mask<isize, N>,
idxs: Simd<usize, N>,
or: Self
) -> Self
🔬This is a nightly-only experimental API. (portable_simd
#86656)
pub fn gather_select( slice: &[T], enable: Mask<isize, N>, idxs: Simd<usize, N>, or: Self ) -> Self
portable_simd
#86656)Reads from indices in slice
to construct a SIMD vector.
The mask enable
s all true
indices and disables all false
indices.
If an index is disabled or is out-of-bounds, the element is selected from the or
vector.
Examples
let vec: Vec<i32> = vec![10, 11, 12, 13, 14, 15, 16, 17, 18];
let idxs = Simd::from_array([9, 3, 0, 5]); // Includes an out-of-bounds index
let alt = Simd::from_array([-5, -4, -3, -2]);
let enable = Mask::from_array([true, true, true, false]); // Includes a masked element
let result = Simd::gather_select(&vec, enable, idxs, alt);
assert_eq!(result, Simd::from_array([-5, 13, 10, -2]));
Runsourcepub unsafe fn gather_select_unchecked(
slice: &[T],
enable: Mask<isize, N>,
idxs: Simd<usize, N>,
or: Self
) -> Self
🔬This is a nightly-only experimental API. (portable_simd
#86656)
pub unsafe fn gather_select_unchecked( slice: &[T], enable: Mask<isize, N>, idxs: Simd<usize, N>, or: Self ) -> Self
portable_simd
#86656)Reads from indices in slice
to construct a SIMD vector.
The mask enable
s all true
indices and disables all false
indices.
If an index is disabled, the element is selected from the or
vector.
Safety
Calling this function with an enable
d out-of-bounds index is undefined behavior
even if the resulting value is not used.
Examples
let vec: Vec<i32> = vec![10, 11, 12, 13, 14, 15, 16, 17, 18];
let idxs = Simd::from_array([9, 3, 0, 5]); // Includes an out-of-bounds index
let alt = Simd::from_array([-5, -4, -3, -2]);
let enable = Mask::from_array([true, true, true, false]); // Includes a masked element
// If this mask was used to gather, it would be unsound. Let's fix that.
let enable = enable & idxs.simd_lt(Simd::splat(vec.len()));
// The out-of-bounds index has been masked, so it's safe to gather now.
let result = unsafe { Simd::gather_select_unchecked(&vec, enable, idxs, alt) };
assert_eq!(result, Simd::from_array([-5, 13, 10, -2]));
Runsourcepub unsafe fn gather_ptr(source: Simd<*const T, N>) -> Selfwhere
T: Default,
🔬This is a nightly-only experimental API. (portable_simd
#86656)
pub unsafe fn gather_ptr(source: Simd<*const T, N>) -> Selfwhere T: Default,
portable_simd
#86656)Read elementwise from pointers into a SIMD vector.
Safety
Each read must satisfy the same conditions as core::ptr::read
.
Example
let values = [6, 2, 4, 9];
let offsets = Simd::from_array([1, 0, 0, 3]);
let source = Simd::splat(values.as_ptr()).wrapping_add(offsets);
let gathered = unsafe { Simd::gather_ptr(source) };
assert_eq!(gathered, Simd::from_array([2, 6, 6, 9]));
Runsourcepub unsafe fn gather_select_ptr(
source: Simd<*const T, N>,
enable: Mask<isize, N>,
or: Self
) -> Self
🔬This is a nightly-only experimental API. (portable_simd
#86656)
pub unsafe fn gather_select_ptr( source: Simd<*const T, N>, enable: Mask<isize, N>, or: Self ) -> Self
portable_simd
#86656)Conditionally read elementwise from pointers into a SIMD vector.
The mask enable
s all true
pointers and disables all false
pointers.
If a pointer is disabled, the element is selected from the or
vector,
and no read is performed.
Safety
Enabled elements must satisfy the same conditions as core::ptr::read
.
Example
let values = [6, 2, 4, 9];
let enable = Mask::from_array([true, true, false, true]);
let offsets = Simd::from_array([1, 0, 0, 3]);
let source = Simd::splat(values.as_ptr()).wrapping_add(offsets);
let gathered = unsafe { Simd::gather_select_ptr(source, enable, Simd::splat(0)) };
assert_eq!(gathered, Simd::from_array([2, 6, 0, 9]));
Runsourcepub fn scatter(self, slice: &mut [T], idxs: Simd<usize, N>)
🔬This is a nightly-only experimental API. (portable_simd
#86656)
pub fn scatter(self, slice: &mut [T], idxs: Simd<usize, N>)
portable_simd
#86656)Writes the values in a SIMD vector to potentially discontiguous indices in slice
.
If an index is out-of-bounds, the write is suppressed without panicking.
If two elements in the scattered vector would write to the same index
only the last element is guaranteed to actually be written.
Examples
let mut vec: Vec<i32> = vec![10, 11, 12, 13, 14, 15, 16, 17, 18];
let idxs = Simd::from_array([9, 3, 0, 0]); // Note the duplicate index.
let vals = Simd::from_array([-27, 82, -41, 124]);
vals.scatter(&mut vec, idxs); // two logical writes means the last wins.
assert_eq!(vec, vec![124, 11, 12, 82, 14, 15, 16, 17, 18]);
Runsourcepub fn scatter_select(
self,
slice: &mut [T],
enable: Mask<isize, N>,
idxs: Simd<usize, N>
)
🔬This is a nightly-only experimental API. (portable_simd
#86656)
pub fn scatter_select( self, slice: &mut [T], enable: Mask<isize, N>, idxs: Simd<usize, N> )
portable_simd
#86656)Writes values from a SIMD vector to multiple potentially discontiguous indices in slice
.
The mask enable
s all true
indices and disables all false
indices.
If an enabled index is out-of-bounds, the write is suppressed without panicking.
If two enabled elements in the scattered vector would write to the same index,
only the last element is guaranteed to actually be written.
Examples
let mut vec: Vec<i32> = vec![10, 11, 12, 13, 14, 15, 16, 17, 18];
let idxs = Simd::from_array([9, 3, 0, 0]); // Includes an out-of-bounds index
let vals = Simd::from_array([-27, 82, -41, 124]);
let enable = Mask::from_array([true, true, true, false]); // Includes a masked element
vals.scatter_select(&mut vec, enable, idxs); // The last write is masked, thus omitted.
assert_eq!(vec, vec![-41, 11, 12, 82, 14, 15, 16, 17, 18]);
Runsourcepub unsafe fn scatter_select_unchecked(
self,
slice: &mut [T],
enable: Mask<isize, N>,
idxs: Simd<usize, N>
)
🔬This is a nightly-only experimental API. (portable_simd
#86656)
pub unsafe fn scatter_select_unchecked( self, slice: &mut [T], enable: Mask<isize, N>, idxs: Simd<usize, N> )
portable_simd
#86656)Writes values from a SIMD vector to multiple potentially discontiguous indices in slice
.
The mask enable
s all true
indices and disables all false
indices.
If two enabled elements in the scattered vector would write to the same index,
only the last element is guaranteed to actually be written.
Safety
Calling this function with an enabled out-of-bounds index is undefined behavior, and may lead to memory corruption.
Examples
let mut vec: Vec<i32> = vec![10, 11, 12, 13, 14, 15, 16, 17, 18];
let idxs = Simd::from_array([9, 3, 0, 0]);
let vals = Simd::from_array([-27, 82, -41, 124]);
let enable = Mask::from_array([true, true, true, false]); // Masks the final index
// If this mask was used to scatter, it would be unsound. Let's fix that.
let enable = enable & idxs.simd_lt(Simd::splat(vec.len()));
// We have masked the OOB index, so it's safe to scatter now.
unsafe { vals.scatter_select_unchecked(&mut vec, enable, idxs); }
// The second write to index 0 was masked, thus omitted.
assert_eq!(vec, vec![-41, 11, 12, 82, 14, 15, 16, 17, 18]);
Runsourcepub unsafe fn scatter_ptr(self, dest: Simd<*mut T, N>)
🔬This is a nightly-only experimental API. (portable_simd
#86656)
pub unsafe fn scatter_ptr(self, dest: Simd<*mut T, N>)
portable_simd
#86656)Write pointers elementwise into a SIMD vector.
Safety
Each write must satisfy the same conditions as core::ptr::write
.
Example
let mut values = [0; 4];
let offset = Simd::from_array([3, 2, 1, 0]);
let ptrs = Simd::splat(values.as_mut_ptr()).wrapping_add(offset);
unsafe { Simd::from_array([6, 3, 5, 7]).scatter_ptr(ptrs); }
assert_eq!(values, [7, 5, 3, 6]);
Runsourcepub unsafe fn scatter_select_ptr(
self,
dest: Simd<*mut T, N>,
enable: Mask<isize, N>
)
🔬This is a nightly-only experimental API. (portable_simd
#86656)
pub unsafe fn scatter_select_ptr( self, dest: Simd<*mut T, N>, enable: Mask<isize, N> )
portable_simd
#86656)Conditionally write pointers elementwise into a SIMD vector.
The mask enable
s all true
pointers and disables all false
pointers.
If a pointer is disabled, the write to its pointee is skipped.
Safety
Enabled pointers must satisfy the same conditions as core::ptr::write
.
Example
let mut values = [0; 4];
let offset = Simd::from_array([3, 2, 1, 0]);
let ptrs = Simd::splat(values.as_mut_ptr()).wrapping_add(offset);
let enable = Mask::from_array([true, true, false, false]);
unsafe { Simd::from_array([6, 3, 5, 7]).scatter_select_ptr(ptrs, enable); }
assert_eq!(values, [0, 0, 3, 6]);
RunTrait Implementations§
source§impl<T, const LANES: usize> Add<&Simd<T, LANES>> for Simd<T, LANES>where
T: SimdElement,
Simd<T, LANES>: Add<Simd<T, LANES>, Output = Simd<T, LANES>>,
LaneCount<LANES>: SupportedLaneCount,
impl<T, const LANES: usize> Add<&Simd<T, LANES>> for Simd<T, LANES>where T: SimdElement, Simd<T, LANES>: Add<Simd<T, LANES>, Output = Simd<T, LANES>>, LaneCount<LANES>: SupportedLaneCount,
source§impl<const N: usize> Add<Simd<i16, N>> for Simd<i16, N>where
i16: SimdElement,
LaneCount<N>: SupportedLaneCount,
impl<const N: usize> Add<Simd<i16, N>> for Simd<i16, N>where i16: SimdElement, LaneCount<N>: SupportedLaneCount,
source§impl<T, U, const LANES: usize> AddAssign<U> for Simd<T, LANES>where
Self: Add<U, Output = Self>,
T: SimdElement,
LaneCount<LANES>: SupportedLaneCount,
impl<T, U, const LANES: usize> AddAssign<U> for Simd<T, LANES>where Self: Add<U, Output = Self>, T: SimdElement, LaneCount<LANES>: SupportedLaneCount,
source§fn add_assign(&mut self, rhs: U)
fn add_assign(&mut self, rhs: U)
+=
operation. Read moresource§impl<T, const N: usize> AsMut<[T]> for Simd<T, N>where
LaneCount<N>: SupportedLaneCount,
T: SimdElement,
impl<T, const N: usize> AsMut<[T]> for Simd<T, N>where LaneCount<N>: SupportedLaneCount, T: SimdElement,
source§impl<T, const N: usize> AsMut<[T; N]> for Simd<T, N>where
LaneCount<N>: SupportedLaneCount,
T: SimdElement,
impl<T, const N: usize> AsMut<[T; N]> for Simd<T, N>where LaneCount<N>: SupportedLaneCount, T: SimdElement,
source§impl<T, const N: usize> AsRef<[T]> for Simd<T, N>where
LaneCount<N>: SupportedLaneCount,
T: SimdElement,
impl<T, const N: usize> AsRef<[T]> for Simd<T, N>where LaneCount<N>: SupportedLaneCount, T: SimdElement,
source§impl<T, const N: usize> AsRef<[T; N]> for Simd<T, N>where
LaneCount<N>: SupportedLaneCount,
T: SimdElement,
impl<T, const N: usize> AsRef<[T; N]> for Simd<T, N>where LaneCount<N>: SupportedLaneCount, T: SimdElement,
source§impl<T, const LANES: usize> BitAnd<&Simd<T, LANES>> for Simd<T, LANES>where
T: SimdElement,
Simd<T, LANES>: BitAnd<Simd<T, LANES>, Output = Simd<T, LANES>>,
LaneCount<LANES>: SupportedLaneCount,
impl<T, const LANES: usize> BitAnd<&Simd<T, LANES>> for Simd<T, LANES>where T: SimdElement, Simd<T, LANES>: BitAnd<Simd<T, LANES>, Output = Simd<T, LANES>>, LaneCount<LANES>: SupportedLaneCount,
source§impl<const N: usize> BitAnd<Simd<i16, N>> for Simd<i16, N>where
i16: SimdElement,
LaneCount<N>: SupportedLaneCount,
impl<const N: usize> BitAnd<Simd<i16, N>> for Simd<i16, N>where i16: SimdElement, LaneCount<N>: SupportedLaneCount,
source§impl<T, U, const LANES: usize> BitAndAssign<U> for Simd<T, LANES>where
Self: BitAnd<U, Output = Self>,
T: SimdElement,
LaneCount<LANES>: SupportedLaneCount,
impl<T, U, const LANES: usize> BitAndAssign<U> for Simd<T, LANES>where Self: BitAnd<U, Output = Self>, T: SimdElement, LaneCount<LANES>: SupportedLaneCount,
source§fn bitand_assign(&mut self, rhs: U)
fn bitand_assign(&mut self, rhs: U)
&=
operation. Read moresource§impl<T, const LANES: usize> BitOr<&Simd<T, LANES>> for Simd<T, LANES>where
T: SimdElement,
Simd<T, LANES>: BitOr<Simd<T, LANES>, Output = Simd<T, LANES>>,
LaneCount<LANES>: SupportedLaneCount,
impl<T, const LANES: usize> BitOr<&Simd<T, LANES>> for Simd<T, LANES>where T: SimdElement, Simd<T, LANES>: BitOr<Simd<T, LANES>, Output = Simd<T, LANES>>, LaneCount<LANES>: SupportedLaneCount,
source§impl<const N: usize> BitOr<Simd<i16, N>> for Simd<i16, N>where
i16: SimdElement,
LaneCount<N>: SupportedLaneCount,
impl<const N: usize> BitOr<Simd<i16, N>> for Simd<i16, N>where i16: SimdElement, LaneCount<N>: SupportedLaneCount,
source§impl<T, U, const LANES: usize> BitOrAssign<U> for Simd<T, LANES>where
Self: BitOr<U, Output = Self>,
T: SimdElement,
LaneCount<LANES>: SupportedLaneCount,
impl<T, U, const LANES: usize> BitOrAssign<U> for Simd<T, LANES>where Self: BitOr<U, Output = Self>, T: SimdElement, LaneCount<LANES>: SupportedLaneCount,
source§fn bitor_assign(&mut self, rhs: U)
fn bitor_assign(&mut self, rhs: U)
|=
operation. Read moresource§impl<T, const LANES: usize> BitXor<&Simd<T, LANES>> for Simd<T, LANES>where
T: SimdElement,
Simd<T, LANES>: BitXor<Simd<T, LANES>, Output = Simd<T, LANES>>,
LaneCount<LANES>: SupportedLaneCount,
impl<T, const LANES: usize> BitXor<&Simd<T, LANES>> for Simd<T, LANES>where T: SimdElement, Simd<T, LANES>: BitXor<Simd<T, LANES>, Output = Simd<T, LANES>>, LaneCount<LANES>: SupportedLaneCount,
source§impl<const N: usize> BitXor<Simd<i16, N>> for Simd<i16, N>where
i16: SimdElement,
LaneCount<N>: SupportedLaneCount,
impl<const N: usize> BitXor<Simd<i16, N>> for Simd<i16, N>where i16: SimdElement, LaneCount<N>: SupportedLaneCount,
source§impl<T, U, const LANES: usize> BitXorAssign<U> for Simd<T, LANES>where
Self: BitXor<U, Output = Self>,
T: SimdElement,
LaneCount<LANES>: SupportedLaneCount,
impl<T, U, const LANES: usize> BitXorAssign<U> for Simd<T, LANES>where Self: BitXor<U, Output = Self>, T: SimdElement, LaneCount<LANES>: SupportedLaneCount,
source§fn bitxor_assign(&mut self, rhs: U)
fn bitxor_assign(&mut self, rhs: U)
^=
operation. Read moresource§impl<T, const N: usize> Clone for Simd<T, N>where
LaneCount<N>: SupportedLaneCount,
T: SimdElement,
impl<T, const N: usize> Clone for Simd<T, N>where LaneCount<N>: SupportedLaneCount, T: SimdElement,
source§impl<T, const LANES: usize> Debug for Simd<T, LANES>where
LaneCount<LANES>: SupportedLaneCount,
T: SimdElement + Debug,
impl<T, const LANES: usize> Debug for Simd<T, LANES>where LaneCount<LANES>: SupportedLaneCount, T: SimdElement + Debug,
source§impl<T, const N: usize> Default for Simd<T, N>where
LaneCount<N>: SupportedLaneCount,
T: SimdElement + Default,
impl<T, const N: usize> Default for Simd<T, N>where LaneCount<N>: SupportedLaneCount, T: SimdElement + Default,
source§impl<T, const LANES: usize> Div<&Simd<T, LANES>> for Simd<T, LANES>where
T: SimdElement,
Simd<T, LANES>: Div<Simd<T, LANES>, Output = Simd<T, LANES>>,
LaneCount<LANES>: SupportedLaneCount,
impl<T, const LANES: usize> Div<&Simd<T, LANES>> for Simd<T, LANES>where T: SimdElement, Simd<T, LANES>: Div<Simd<T, LANES>, Output = Simd<T, LANES>>, LaneCount<LANES>: SupportedLaneCount,
source§impl<const N: usize> Div<Simd<i16, N>> for Simd<i16, N>where
i16: SimdElement,
LaneCount<N>: SupportedLaneCount,
impl<const N: usize> Div<Simd<i16, N>> for Simd<i16, N>where i16: SimdElement, LaneCount<N>: SupportedLaneCount,
source§impl<T, U, const LANES: usize> DivAssign<U> for Simd<T, LANES>where
Self: Div<U, Output = Self>,
T: SimdElement,
LaneCount<LANES>: SupportedLaneCount,
impl<T, U, const LANES: usize> DivAssign<U> for Simd<T, LANES>where Self: Div<U, Output = Self>, T: SimdElement, LaneCount<LANES>: SupportedLaneCount,
source§fn div_assign(&mut self, rhs: U)
fn div_assign(&mut self, rhs: U)
/=
operation. Read moresource§impl<T, const N: usize> From<[T; N]> for Simd<T, N>where
LaneCount<N>: SupportedLaneCount,
T: SimdElement,
impl<T, const N: usize> From<[T; N]> for Simd<T, N>where LaneCount<N>: SupportedLaneCount, T: SimdElement,
source§impl<T, const N: usize> Hash for Simd<T, N>where
LaneCount<N>: SupportedLaneCount,
T: SimdElement + Hash,
impl<T, const N: usize> Hash for Simd<T, N>where LaneCount<N>: SupportedLaneCount, T: SimdElement + Hash,
source§impl<I, T, const LANES: usize> Index<I> for Simd<T, LANES>where
T: SimdElement,
LaneCount<LANES>: SupportedLaneCount,
I: SliceIndex<[T]>,
impl<I, T, const LANES: usize> Index<I> for Simd<T, LANES>where T: SimdElement, LaneCount<LANES>: SupportedLaneCount, I: SliceIndex<[T]>,
source§impl<I, T, const LANES: usize> IndexMut<I> for Simd<T, LANES>where
T: SimdElement,
LaneCount<LANES>: SupportedLaneCount,
I: SliceIndex<[T]>,
impl<I, T, const LANES: usize> IndexMut<I> for Simd<T, LANES>where T: SimdElement, LaneCount<LANES>: SupportedLaneCount, I: SliceIndex<[T]>,
source§impl<T, const LANES: usize> Mul<&Simd<T, LANES>> for Simd<T, LANES>where
T: SimdElement,
Simd<T, LANES>: Mul<Simd<T, LANES>, Output = Simd<T, LANES>>,
LaneCount<LANES>: SupportedLaneCount,
impl<T, const LANES: usize> Mul<&Simd<T, LANES>> for Simd<T, LANES>where T: SimdElement, Simd<T, LANES>: Mul<Simd<T, LANES>, Output = Simd<T, LANES>>, LaneCount<LANES>: SupportedLaneCount,
source§impl<const N: usize> Mul<Simd<i16, N>> for Simd<i16, N>where
i16: SimdElement,
LaneCount<N>: SupportedLaneCount,
impl<const N: usize> Mul<Simd<i16, N>> for Simd<i16, N>where i16: SimdElement, LaneCount<N>: SupportedLaneCount,
source§impl<T, U, const LANES: usize> MulAssign<U> for Simd<T, LANES>where
Self: Mul<U, Output = Self>,
T: SimdElement,
LaneCount<LANES>: SupportedLaneCount,
impl<T, U, const LANES: usize> MulAssign<U> for Simd<T, LANES>where Self: Mul<U, Output = Self>, T: SimdElement, LaneCount<LANES>: SupportedLaneCount,
source§fn mul_assign(&mut self, rhs: U)
fn mul_assign(&mut self, rhs: U)
*=
operation. Read moresource§impl<const LANES: usize> Neg for Simd<i16, LANES>where
i16: SimdElement,
LaneCount<LANES>: SupportedLaneCount,
impl<const LANES: usize> Neg for Simd<i16, LANES>where i16: SimdElement, LaneCount<LANES>: SupportedLaneCount,
source§impl<const LANES: usize> Not for Simd<i16, LANES>where
i16: SimdElement,
LaneCount<LANES>: SupportedLaneCount,
impl<const LANES: usize> Not for Simd<i16, LANES>where i16: SimdElement, LaneCount<LANES>: SupportedLaneCount,
source§impl<T, const N: usize> Ord for Simd<T, N>where
LaneCount<N>: SupportedLaneCount,
T: SimdElement + Ord,
impl<T, const N: usize> Ord for Simd<T, N>where LaneCount<N>: SupportedLaneCount, T: SimdElement + Ord,
source§impl<T, const N: usize> PartialEq<Simd<T, N>> for Simd<T, N>where
LaneCount<N>: SupportedLaneCount,
T: SimdElement + PartialEq,
impl<T, const N: usize> PartialEq<Simd<T, N>> for Simd<T, N>where LaneCount<N>: SupportedLaneCount, T: SimdElement + PartialEq,
source§impl<T, const N: usize> PartialOrd<Simd<T, N>> for Simd<T, N>where
LaneCount<N>: SupportedLaneCount,
T: SimdElement + PartialOrd,
impl<T, const N: usize> PartialOrd<Simd<T, N>> for Simd<T, N>where LaneCount<N>: SupportedLaneCount, T: SimdElement + PartialOrd,
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<'a, const LANES: usize> Product<&'a Simd<i16, LANES>> for Simd<i16, LANES>where
LaneCount<LANES>: SupportedLaneCount,
impl<'a, const LANES: usize> Product<&'a Simd<i16, LANES>> for Simd<i16, LANES>where LaneCount<LANES>: SupportedLaneCount,
source§impl<const LANES: usize> Product<Simd<i16, LANES>> for Simd<i16, LANES>where
LaneCount<LANES>: SupportedLaneCount,
impl<const LANES: usize> Product<Simd<i16, LANES>> for Simd<i16, LANES>where LaneCount<LANES>: SupportedLaneCount,
source§impl<T, const LANES: usize> Rem<&Simd<T, LANES>> for Simd<T, LANES>where
T: SimdElement,
Simd<T, LANES>: Rem<Simd<T, LANES>, Output = Simd<T, LANES>>,
LaneCount<LANES>: SupportedLaneCount,
impl<T, const LANES: usize> Rem<&Simd<T, LANES>> for Simd<T, LANES>where T: SimdElement, Simd<T, LANES>: Rem<Simd<T, LANES>, Output = Simd<T, LANES>>, LaneCount<LANES>: SupportedLaneCount,
source§impl<const N: usize> Rem<Simd<i16, N>> for Simd<i16, N>where
i16: SimdElement,
LaneCount<N>: SupportedLaneCount,
impl<const N: usize> Rem<Simd<i16, N>> for Simd<i16, N>where i16: SimdElement, LaneCount<N>: SupportedLaneCount,
source§impl<T, U, const LANES: usize> RemAssign<U> for Simd<T, LANES>where
Self: Rem<U, Output = Self>,
T: SimdElement,
LaneCount<LANES>: SupportedLaneCount,
impl<T, U, const LANES: usize> RemAssign<U> for Simd<T, LANES>where Self: Rem<U, Output = Self>, T: SimdElement, LaneCount<LANES>: SupportedLaneCount,
source§fn rem_assign(&mut self, rhs: U)
fn rem_assign(&mut self, rhs: U)
%=
operation. Read moresource§impl<T, const LANES: usize> Shl<&Simd<T, LANES>> for Simd<T, LANES>where
T: SimdElement,
Simd<T, LANES>: Shl<Simd<T, LANES>, Output = Simd<T, LANES>>,
LaneCount<LANES>: SupportedLaneCount,
impl<T, const LANES: usize> Shl<&Simd<T, LANES>> for Simd<T, LANES>where T: SimdElement, Simd<T, LANES>: Shl<Simd<T, LANES>, Output = Simd<T, LANES>>, LaneCount<LANES>: SupportedLaneCount,
source§impl<const N: usize> Shl<Simd<i16, N>> for Simd<i16, N>where
i16: SimdElement,
LaneCount<N>: SupportedLaneCount,
impl<const N: usize> Shl<Simd<i16, N>> for Simd<i16, N>where i16: SimdElement, LaneCount<N>: SupportedLaneCount,
source§impl<T, U, const LANES: usize> ShlAssign<U> for Simd<T, LANES>where
Self: Shl<U, Output = Self>,
T: SimdElement,
LaneCount<LANES>: SupportedLaneCount,
impl<T, U, const LANES: usize> ShlAssign<U> for Simd<T, LANES>where Self: Shl<U, Output = Self>, T: SimdElement, LaneCount<LANES>: SupportedLaneCount,
source§fn shl_assign(&mut self, rhs: U)
fn shl_assign(&mut self, rhs: U)
<<=
operation. Read moresource§impl<T, const LANES: usize> Shr<&Simd<T, LANES>> for Simd<T, LANES>where
T: SimdElement,
Simd<T, LANES>: Shr<Simd<T, LANES>, Output = Simd<T, LANES>>,
LaneCount<LANES>: SupportedLaneCount,
impl<T, const LANES: usize> Shr<&Simd<T, LANES>> for Simd<T, LANES>where T: SimdElement, Simd<T, LANES>: Shr<Simd<T, LANES>, Output = Simd<T, LANES>>, LaneCount<LANES>: SupportedLaneCount,
source§impl<const N: usize> Shr<Simd<i16, N>> for Simd<i16, N>where
i16: SimdElement,
LaneCount<N>: SupportedLaneCount,
impl<const N: usize> Shr<Simd<i16, N>> for Simd<i16, N>where i16: SimdElement, LaneCount<N>: SupportedLaneCount,
source§impl<T, U, const LANES: usize> ShrAssign<U> for Simd<T, LANES>where
Self: Shr<U, Output = Self>,
T: SimdElement,
LaneCount<LANES>: SupportedLaneCount,
impl<T, U, const LANES: usize> ShrAssign<U> for Simd<T, LANES>where Self: Shr<U, Output = Self>, T: SimdElement, LaneCount<LANES>: SupportedLaneCount,
source§fn shr_assign(&mut self, rhs: U)
fn shr_assign(&mut self, rhs: U)
>>=
operation. Read moresource§impl<const LANES: usize> SimdInt for Simd<i16, LANES>where
LaneCount<LANES>: SupportedLaneCount,
impl<const LANES: usize> SimdInt for Simd<i16, LANES>where LaneCount<LANES>: SupportedLaneCount,
§type Mask = Mask<<i16 as SimdElement>::Mask, LANES>
type Mask = Mask<<i16 as SimdElement>::Mask, LANES>
portable_simd
#86656)§type Scalar = i16
type Scalar = i16
portable_simd
#86656)§type Cast<T: SimdElement> = Simd<T, LANES>
type Cast<T: SimdElement> = Simd<T, LANES>
portable_simd
#86656)source§fn cast<T: SimdCast>(self) -> Self::Cast<T>
fn cast<T: SimdCast>(self) -> Self::Cast<T>
portable_simd
#86656)source§fn saturating_add(self, second: Self) -> Self
fn saturating_add(self, second: Self) -> Self
portable_simd
#86656)source§fn saturating_sub(self, second: Self) -> Self
fn saturating_sub(self, second: Self) -> Self
portable_simd
#86656)source§fn abs(self) -> Self
fn abs(self) -> Self
portable_simd
#86656)source§fn saturating_abs(self) -> Self
fn saturating_abs(self) -> Self
portable_simd
#86656)source§fn saturating_neg(self) -> Self
fn saturating_neg(self) -> Self
portable_simd
#86656)source§fn is_positive(self) -> Self::Mask
fn is_positive(self) -> Self::Mask
portable_simd
#86656)source§fn is_negative(self) -> Self::Mask
fn is_negative(self) -> Self::Mask
portable_simd
#86656)source§fn signum(self) -> Self
fn signum(self) -> Self
portable_simd
#86656)source§fn reduce_sum(self) -> Self::Scalar
fn reduce_sum(self) -> Self::Scalar
portable_simd
#86656)source§fn reduce_product(self) -> Self::Scalar
fn reduce_product(self) -> Self::Scalar
portable_simd
#86656)source§fn reduce_max(self) -> Self::Scalar
fn reduce_max(self) -> Self::Scalar
portable_simd
#86656)source§fn reduce_min(self) -> Self::Scalar
fn reduce_min(self) -> Self::Scalar
portable_simd
#86656)source§fn reduce_and(self) -> Self::Scalar
fn reduce_and(self) -> Self::Scalar
portable_simd
#86656)source§fn reduce_or(self) -> Self::Scalar
fn reduce_or(self) -> Self::Scalar
portable_simd
#86656)source§fn reduce_xor(self) -> Self::Scalar
fn reduce_xor(self) -> Self::Scalar
portable_simd
#86656)source§impl<const LANES: usize> SimdOrd for Simd<i16, LANES>where
LaneCount<LANES>: SupportedLaneCount,
impl<const LANES: usize> SimdOrd for Simd<i16, LANES>where LaneCount<LANES>: SupportedLaneCount,
source§fn simd_max(self, other: Self) -> Self
fn simd_max(self, other: Self) -> Self
portable_simd
#86656)other
.source§fn simd_min(self, other: Self) -> Self
fn simd_min(self, other: Self) -> Self
portable_simd
#86656)other
.source§fn simd_clamp(self, min: Self, max: Self) -> Self
fn simd_clamp(self, min: Self, max: Self) -> Self
portable_simd
#86656)source§impl<const LANES: usize> SimdPartialEq for Simd<i16, LANES>where
LaneCount<LANES>: SupportedLaneCount,
impl<const LANES: usize> SimdPartialEq for Simd<i16, LANES>where LaneCount<LANES>: SupportedLaneCount,
§type Mask = Mask<<i16 as SimdElement>::Mask, LANES>
type Mask = Mask<<i16 as SimdElement>::Mask, LANES>
portable_simd
#86656)source§impl<const LANES: usize> SimdPartialOrd for Simd<i16, LANES>where
LaneCount<LANES>: SupportedLaneCount,
impl<const LANES: usize> SimdPartialOrd for Simd<i16, LANES>where LaneCount<LANES>: SupportedLaneCount,
source§fn simd_lt(self, other: Self) -> Self::Mask
fn simd_lt(self, other: Self) -> Self::Mask
portable_simd
#86656)other
.source§fn simd_le(self, other: Self) -> Self::Mask
fn simd_le(self, other: Self) -> Self::Mask
portable_simd
#86656)other
.source§impl<T, const LANES: usize> Sub<&Simd<T, LANES>> for Simd<T, LANES>where
T: SimdElement,
Simd<T, LANES>: Sub<Simd<T, LANES>, Output = Simd<T, LANES>>,
LaneCount<LANES>: SupportedLaneCount,
impl<T, const LANES: usize> Sub<&Simd<T, LANES>> for Simd<T, LANES>where T: SimdElement, Simd<T, LANES>: Sub<Simd<T, LANES>, Output = Simd<T, LANES>>, LaneCount<LANES>: SupportedLaneCount,
source§impl<const N: usize> Sub<Simd<i16, N>> for Simd<i16, N>where
i16: SimdElement,
LaneCount<N>: SupportedLaneCount,
impl<const N: usize> Sub<Simd<i16, N>> for Simd<i16, N>where i16: SimdElement, LaneCount<N>: SupportedLaneCount,
source§impl<T, U, const LANES: usize> SubAssign<U> for Simd<T, LANES>where
Self: Sub<U, Output = Self>,
T: SimdElement,
LaneCount<LANES>: SupportedLaneCount,
impl<T, U, const LANES: usize> SubAssign<U> for Simd<T, LANES>where Self: Sub<U, Output = Self>, T: SimdElement, LaneCount<LANES>: SupportedLaneCount,
source§fn sub_assign(&mut self, rhs: U)
fn sub_assign(&mut self, rhs: U)
-=
operation. Read more