mod test;
use crate::cmp::{
SimdEq,
SimdOrd,
SimdPartialEq,
SimdPartialOrd,
};
use crate::num::SimdInt;
use crate::simd::SimdScalar;
use core::cmp::{
Eq,
Ord,
PartialEq,
PartialOrd,
};
use core::ops::{
Add,
AddAssign,
BitAnd,
BitAndAssign,
BitOr,
BitOrAssign,
BitXor,
BitXorAssign,
Div,
DivAssign,
Mul,
MulAssign,
Not,
Rem,
RemAssign,
Shl,
ShlAssign,
Shr,
ShrAssign,
Sub,
SubAssign,
};
use multitype::Uint;
pub trait SimdUint
where
Self:
crate::num::seal::SimdUint
+ Copy
+ Eq
+ Ord
+ PartialEq
+ PartialOrd
+ SimdEq
+ SimdOrd
+ SimdPartialEq
+ SimdPartialOrd
+ Add< Output = Self>
+ BitAnd<Output = Self>
+ BitOr< Output = Self>
+ BitXor<Output = Self>
+ Div< Output = Self>
+ Mul< Output = Self>
+ Not< Output = Self>
+ Rem< Output = Self>
+ Shl< Output = Self>
+ Shr< Output = Self>
+ Sub< Output = Self>
+ AddAssign
+ BitAndAssign
+ BitOrAssign
+ BitXorAssign
+ DivAssign
+ MulAssign
+ RemAssign
+ ShlAssign
+ ShrAssign
+ SubAssign,
{
type Scalar: SimdScalar + Uint;
const LEN: usize;
type Int: SimdInt<
Scalar = <Self::Scalar as Uint>::Int,
Uint = Self,
U32 = Self::U32,
>;
type U32: SimdUint<Scalar = u32>;
const MIN: Self;
const MAX: Self;
#[must_use]
fn from_le(value: Self) -> Self;
#[must_use]
fn from_be(value: Self) -> Self;
#[must_use]
fn div_ceil(self, rhs: Self) -> Self;
#[must_use]
fn div_euclid(self, rhs: Self) -> Self;
#[must_use]
fn rem_euclid(self, rhs: Self) -> Self;
#[must_use]
fn rotate_left(self, rhs: Self::U32) -> Self;
#[must_use]
fn rotate_right(self, rhs: Self::U32) -> Self;
#[must_use]
fn swap_bytes(self) -> Self;
#[must_use]
fn reverse_bits(self) -> Self;
#[must_use]
fn pow(self, exp: Self::U32) -> Self;
#[must_use]
fn isqrt(self) -> Self;
#[must_use]
fn ilog(self, base: Self) -> Self::U32;
#[must_use]
fn ilog2(self) -> Self::U32;
#[must_use]
fn ilog10(self) -> Self::U32;
#[must_use]
fn abs_diff(self, rhs: Self) -> Self;
#[must_use]
fn midpoint(self, rhs: Self) -> Self;
#[must_use]
fn count_zeros(self) -> Self::U32;
#[must_use]
fn count_ones(self) -> Self::U32;
#[must_use]
fn leading_zeros(self) -> Self::U32;
#[must_use]
fn leading_ones(self) -> Self::U32;
#[must_use]
fn trailing_zeros(self) -> Self::U32;
#[must_use]
fn trailing_ones(self) -> Self::U32;
#[must_use]
fn is_multiple_of(self, rhs: Self) -> Self::Mask;
#[must_use]
fn is_power_of_two(self) -> Self::Mask;
#[must_use]
fn next_multiple_of(self, rhs: Self) -> Self;
#[must_use]
fn next_power_of_two(self) -> Self;
#[must_use]
fn strict_add(self, rhs: Self) -> Self;
#[must_use]
fn strict_add_signed(self, rhs: Self::Int) -> Self;
#[must_use]
fn strict_sub(self, rhs: Self) -> Self;
#[must_use]
fn strict_sub_signed(self, rhs: Self::Int) -> Self;
#[must_use]
fn strict_mul(self, rhs: Self) -> Self;
#[must_use]
fn strict_div(self, rhs: Self) -> Self;
#[must_use]
fn strict_div_euclid(self, rhs: Self) -> Self;
#[must_use]
fn strict_rem(self, rhs: Self) -> Self;
#[must_use]
fn strict_rem_euclid(self, rhs: Self) -> Self;
#[must_use]
fn strict_shl(self, rhs: Self::U32) -> Self;
#[must_use]
fn strict_shr(self, rhs: Self::U32) -> Self;
#[must_use]
fn strict_neg(self) -> Self;
#[must_use]
fn strict_pow(self, rhs: Self::U32) -> Self;
#[expect(clippy::missing_safety_doc)]
#[must_use]
unsafe fn unchecked_add(self, rhs: Self) -> Self;
#[expect(clippy::missing_safety_doc)]
#[must_use]
unsafe fn unchecked_sub(self, rhs: Self) -> Self;
#[expect(clippy::missing_safety_doc)]
#[must_use]
unsafe fn unchecked_mul(self, rhs: Self) -> Self;
#[must_use]
fn wrapping_add(self, rhs: Self) -> Self;
#[must_use]
fn wrapping_add_signed(self, rhs: Self::Int) -> Self;
#[must_use]
fn wrapping_sub(self, rhs: Self) -> Self;
#[must_use]
fn wrapping_sub_signed(self, rhs: Self::Int) -> Self;
#[must_use]
fn wrapping_mul(self, rhs: Self) -> Self;
#[must_use]
fn wrapping_div(self, rhs: Self) -> Self;
#[must_use]
fn wrapping_div_euclid(self, rhs: Self) -> Self;
#[must_use]
fn wrapping_rem(self, rhs: Self) -> Self;
#[must_use]
fn wrapping_rem_euclid(self, rhs: Self) -> Self;
#[must_use]
fn wrapping_shl(self, rhs: Self::U32) -> Self;
#[must_use]
fn wrapping_shr(self, rhs: Self::U32) -> Self;
#[must_use]
fn wrapping_neg(self) -> Self;
#[must_use]
fn wrapping_pow(self, exp: Self::U32) -> Self;
#[must_use]
fn saturating_add(self, rhs: Self) -> Self;
#[must_use]
fn saturating_add_signed(self, rhs: Self::Int) -> Self;
#[must_use]
fn saturating_sub(self, rhs: Self) -> Self;
#[must_use]
fn saturating_sub_signed(self, rhs: Self::Int) -> Self;
#[must_use]
fn saturating_mul(self, rhs: Self) -> Self;
#[must_use]
fn saturating_div(self, rhs: Self) -> Self;
#[must_use]
fn saturating_pow(self, exp: Self::U32) -> Self;
#[must_use]
fn unbounded_shl(self, rhs: Self::U32) -> Self;
#[must_use]
fn unbounded_shr(self, rhs: Self::U32) -> Self;
#[must_use]
fn cast_signed(self) -> Self::Int;
#[must_use]
fn to_le(self) -> Self;
#[must_use]
fn to_be(self) -> Self;
}