mod test;
use crate::mask::Mask;
use crate::simd::{
Layout,
Simd,
SimdScalar,
ValidLayout,
};
use multitype::Uint;
#[expect(clippy::wrong_self_convention)]
pub trait SimdUintExt<T, const N: usize>: crate::num::seal::SimdUintExt
where
T: SimdScalar + Uint<Int: SimdScalar>,
Layout<T, N>: ValidLayout,
Layout<<T as Uint>::Int, N>: ValidLayout,
Layout<u32, N>: ValidLayout,
Layout<i32, N>: ValidLayout,
Layout<(), N>: ValidLayout,
{
const BITS: u32;
const MIN: Self;
const MAX: Self;
const ZERO: Self;
const ONE: 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: Simd<u32, N>) -> Self;
#[must_use]
fn rotate_right(self, rhs: Simd<u32, N>) -> Self;
#[must_use]
fn swap_bytes(self) -> Self;
#[must_use]
fn reverse_bits(self) -> Self;
#[must_use]
fn pow(self, exp: Simd<u32, N>) -> Self;
#[must_use]
fn isqrt(self) -> Self;
#[must_use]
fn ilog(self, base: Self) -> Simd<u32, N>;
#[must_use]
fn ilog2(self) -> Simd<u32, N>;
#[must_use]
fn ilog10(self) -> Simd<u32, N>;
#[must_use]
fn abs_diff(self, rhs: Self) -> Self;
#[must_use]
fn midpoint(self, rhs: Self) -> Self;
#[must_use]
fn count_zeros(self) -> Simd<u32, N>;
#[must_use]
fn count_ones(self) -> Simd<u32, N>;
#[must_use]
fn leading_zeros(self) -> Simd<u32, N>;
#[must_use]
fn leading_ones(self) -> Simd<u32, N>;
#[must_use]
fn trailing_zeros(self) -> Simd<u32, N>;
#[must_use]
fn trailing_ones(self) -> Simd<u32, N>;
#[must_use]
fn is_multiple_of(self, rhs: Self) -> Mask<N>;
#[must_use]
fn is_power_of_two(self) -> Mask<N>;
#[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: Simd<T::Int, N>) -> Self;
#[must_use]
fn strict_sub(self, rhs: Self) -> Self;
#[must_use]
fn strict_sub_signed(self, rhs: Simd<T::Int, N>) -> 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: Simd<u32, N>) -> Self;
#[must_use]
fn strict_shr(self, rhs: Simd<u32, N>) -> Self;
#[must_use]
fn strict_neg(self) -> Self;
#[must_use]
fn strict_pow(self, rhs: Simd<u32, N>) -> 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: Simd<T::Int, N>) -> Self;
#[must_use]
fn wrapping_sub(self, rhs: Self) -> Self;
#[must_use]
fn wrapping_sub_signed(self, rhs: Simd<T::Int, N>) -> 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: Simd<u32, N>) -> Self;
#[must_use]
fn wrapping_shr(self, rhs: Simd<u32, N>) -> Self;
#[must_use]
fn wrapping_neg(self) -> Self;
#[must_use]
fn wrapping_pow(self, exp: Simd<u32, N>) -> Self;
#[must_use]
fn saturating_add(self, rhs: Self) -> Self;
#[must_use]
fn saturating_add_signed(self, rhs: Simd<T::Int, N>) -> Self;
#[must_use]
fn saturating_sub(self, rhs: Self) -> Self;
#[must_use]
fn saturating_sub_signed(self, rhs: Simd<T::Int, N>) -> 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: Simd<u32, N>) -> Self;
#[must_use]
fn unbounded_shl(self, rhs: Simd<u32, N>) -> Self;
#[must_use]
fn unbounded_shr(self, rhs: Simd<u32, N>) -> Self;
#[must_use]
fn cast_signed(self) -> Simd<T::Int, N>;
#[must_use]
fn to_le(self) -> Self;
#[must_use]
fn to_be(self) -> Self;
}