Trait simdeez::SimdInt

source ·
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§

source

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.

source

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.

source

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.

source

fn from_i64(value: i64) -> Self

Provided Methods§

source

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.

For 64 bits, this operations is missing in most implementations and is emulated here under SSE2, SSE4.1, and AVX2.

source

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.

For 64 bits, this operations is missing in most implementations and is emulated here under SSE2, SSE4.1, and AVX2.

Implementors§