pub trait SimdInt: SimdBaseOps + Shl<i32, Output = Self> + ShlAssign<i32> + Shr<i32, Output = Self> + ShrAssign<i32> {
// Required methods
fn shl(self, rhs: i32) -> Self;
fn shr(self, rhs: i32) -> Self;
fn horizontal_unsigned_add(self) -> Self::HorizontalAddScalar;
fn from_i64(value: i64) -> Self;
// Provided methods
fn shl_const<const BY: i32>(self) -> Self { ... }
fn shr_const<const BY: i32>(self) -> Self { ... }
}
Expand description
Operations shared by 16 and 32 bit int types
Required Methods§
sourcefn shl(self, rhs: i32) -> Self
fn shl(self, rhs: i32) -> Self
Shift each value left by n bits.
For 64 bits, this operations is missing in most implementations and is emulated here under SSE2, SSE4.1, and AVX2.
sourcefn shr(self, rhs: i32) -> Self
fn shr(self, rhs: i32) -> Self
Shift each value right by n bits.
For 64 bits, this operations is missing in most implementations and is emulated here under SSE2, SSE4.1, and AVX2.
sourcefn 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.