Trait simdeez::SimdBaseOps
source · pub trait SimdBaseOps: SimdConsts + SimdBaseIo + IndexMut<usize> + Index<usize, Output = <Self as SimdConsts>::Scalar> + Add<Self, Output = Self> + Add<<Self as SimdConsts>::Scalar, Output = Self> + AddAssign<Self> + AddAssign<<Self as SimdConsts>::Scalar> + Neg<Output = Self> + Sub<Self, Output = Self> + Sub<<Self as SimdConsts>::Scalar, Output = Self> + SubAssign<Self> + SubAssign<<Self as SimdConsts>::Scalar> + Mul<Self, Output = Self> + Mul<<Self as SimdConsts>::Scalar, Output = Self> + MulAssign<Self> + MulAssign<<Self as SimdConsts>::Scalar> + BitAnd<Self, Output = Self> + BitAnd<<Self as SimdConsts>::Scalar, Output = Self> + BitAndAssign<Self> + BitAndAssign<<Self as SimdConsts>::Scalar> + BitOr<Self, Output = Self> + BitOr<<Self as SimdConsts>::Scalar, Output = Self> + BitOrAssign<Self> + BitOrAssign<<Self as SimdConsts>::Scalar> + BitXor<Self, Output = Self> + BitXor<<Self as SimdConsts>::Scalar, Output = Self> + BitXorAssign<Self> + BitXorAssign<<Self as SimdConsts>::Scalar> + Not<Output = Self> {
Show 20 methods
// Required methods
fn add(self, rhs: Self) -> Self;
fn sub(self, rhs: Self) -> Self;
fn mul(self, rhs: Self) -> Self;
fn bit_and(self, rhs: Self) -> Self;
fn bit_or(self, rhs: Self) -> Self;
fn bit_xor(self, rhs: Self) -> Self;
fn bit_not(self) -> Self;
fn abs(self) -> Self;
fn and_not(self, rhs: Self) -> Self;
fn blendv(self, a: Self, b: Self) -> Self;
fn cmp_eq(self, rhs: Self) -> Self;
fn cmp_neq(self, rhs: Self) -> Self;
fn cmp_lt(self, rhs: Self) -> Self;
fn cmp_lte(self, rhs: Self) -> Self;
fn cmp_gt(self, rhs: Self) -> Self;
fn cmp_gte(self, rhs: Self) -> Self;
fn max(self, rhs: Self) -> Self;
fn min(self, rhs: Self) -> Self;
fn horizontal_add(self) -> Self::HorizontalAddScalar;
// Provided method
fn neg(self) -> Self { ... }
}
Expand description
Operations shared by all SIMD types
Required Methods§
sourcefn 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.
Note: SSE2 will select B only when all bits are 1, while SSE41 and AVX2 only check the high bit. To maintain portability ensure all bits are 1 when using blend. Results of comparison operations adhere to this.
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourcefn horizontal_add(self) -> Self::HorizontalAddScalar
fn horizontal_add(self) -> Self::HorizontalAddScalar
Add every number in the vector together