pub trait SimdUint: Copy + Sealed {
type Scalar;
type Cast<T: SimdElement>;
// Required methods
fn cast<T: SimdCast>(self) -> Self::Cast<T>;
fn saturating_add(self, second: Self) -> Self;
fn saturating_sub(self, second: Self) -> Self;
fn reduce_sum(self) -> Self::Scalar;
fn reduce_product(self) -> Self::Scalar;
fn reduce_max(self) -> Self::Scalar;
fn reduce_min(self) -> Self::Scalar;
fn reduce_and(self) -> Self::Scalar;
fn reduce_or(self) -> Self::Scalar;
fn reduce_xor(self) -> Self::Scalar;
}
portable_simd
#86656)Expand description
Operations on SIMD vectors of unsigned integers.
Required Associated Types§
sourcetype Scalar
type Scalar
portable_simd
#86656)Scalar type contained by this SIMD vector type.
sourcetype Cast<T: SimdElement>
type Cast<T: SimdElement>
portable_simd
#86656)A SIMD vector with a different element type.
Required Methods§
sourcefn cast<T: SimdCast>(self) -> Self::Cast<T>
fn cast<T: SimdCast>(self) -> Self::Cast<T>
portable_simd
#86656)Performs elementwise conversion of this vector’s elements to another SIMD-valid type.
This follows the semantics of Rust’s as
conversion for casting integers (wrapping to
other integer types, and saturating to float types).
sourcefn saturating_add(self, second: Self) -> Self
fn saturating_add(self, second: Self) -> Self
portable_simd
#86656)sourcefn saturating_sub(self, second: Self) -> Self
fn saturating_sub(self, second: Self) -> Self
portable_simd
#86656)sourcefn reduce_sum(self) -> Self::Scalar
fn reduce_sum(self) -> Self::Scalar
portable_simd
#86656)Returns the sum of the lanes of the vector, with wrapping addition.
sourcefn reduce_product(self) -> Self::Scalar
fn reduce_product(self) -> Self::Scalar
portable_simd
#86656)Returns the product of the lanes of the vector, with wrapping multiplication.
sourcefn reduce_max(self) -> Self::Scalar
fn reduce_max(self) -> Self::Scalar
portable_simd
#86656)Returns the maximum lane in the vector.
sourcefn reduce_min(self) -> Self::Scalar
fn reduce_min(self) -> Self::Scalar
portable_simd
#86656)Returns the minimum lane in the vector.
sourcefn reduce_and(self) -> Self::Scalar
fn reduce_and(self) -> Self::Scalar
portable_simd
#86656)Returns the cumulative bitwise “and” across the lanes of the vector.
sourcefn reduce_or(self) -> Self::Scalar
fn reduce_or(self) -> Self::Scalar
portable_simd
#86656)Returns the cumulative bitwise “or” across the lanes of the vector.
sourcefn reduce_xor(self) -> Self::Scalar
fn reduce_xor(self) -> Self::Scalar
portable_simd
#86656)Returns the cumulative bitwise “xor” across the lanes of the vector.