BitBlock

Trait BitBlock 

Source
pub trait BitBlock<const L: usize>:
    Not<Output = Self>
    + BitAnd<Output = Self>
    + BitOr<Output = Self>
    + BitXor<Output = Self>
    + Add<Output = Self>
    + Sub<Output = Self>
    + Eq
    + Sized
    + Copy
    + Clone
    + Debug
    + From<Self::Element>
    + From<[Self::Element; L]> {
    type Element: BitBlockElement;

    const BIT_WIDTH: usize;
    const ELEMENT_BIT_WIDTH: usize;
    const LANES: usize;
    const ZERO_ELEMENT: Self::Element;
    const ONE_ELEMENT: Self::Element;
    const MAX_ELEMENT: Self::Element;
    const ZERO: Self;
    const MAX: Self;

    // Required methods
    fn to_array(self) -> [Self::Element; L];
    fn and_inplace(&mut self, rhs: &Self);
    fn or_inplace(&mut self, rhs: &Self);
    fn xor_inplace(&mut self, rhs: &Self);
}

Required Associated Constants§

Required Associated Types§

Required Methods§

Source

fn to_array(self) -> [Self::Element; L]

Source

fn and_inplace(&mut self, rhs: &Self)

Source

fn or_inplace(&mut self, rhs: &Self)

Source

fn xor_inplace(&mut self, rhs: &Self)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl BitBlock<2> for u64x2

Source§

const BIT_WIDTH: usize = 128usize

Source§

const ELEMENT_BIT_WIDTH: usize = 64usize

Source§

const LANES: usize = 2usize

Source§

const ZERO_ELEMENT: u64 = 0u64

Source§

const ONE_ELEMENT: u64 = 1u64

Source§

const MAX_ELEMENT: u64 = 18_446_744_073_709_551_615u64

Source§

const ZERO: Self = u64x2::ZERO

Source§

const MAX: Self = u64x2::MAX

Source§

type Element = u64

Source§

fn to_array(self) -> [u64; 2]

Source§

fn and_inplace(&mut self, rhs: &Self)

Source§

fn or_inplace(&mut self, rhs: &Self)

Source§

fn xor_inplace(&mut self, rhs: &Self)

Source§

impl BitBlock<4> for u32x4

Source§

const BIT_WIDTH: usize = 128usize

Source§

const ELEMENT_BIT_WIDTH: usize = 32usize

Source§

const LANES: usize = 4usize

Source§

const ZERO_ELEMENT: u32 = 0u32

Source§

const ONE_ELEMENT: u32 = 1u32

Source§

const MAX_ELEMENT: u32 = 4_294_967_295u32

Source§

const ZERO: Self = u32x4::ZERO

Source§

const MAX: Self = u32x4::MAX

Source§

type Element = u32

Source§

fn to_array(self) -> [u32; 4]

Source§

fn and_inplace(&mut self, rhs: &Self)

Source§

fn or_inplace(&mut self, rhs: &Self)

Source§

fn xor_inplace(&mut self, rhs: &Self)

Source§

impl BitBlock<4> for u64x4

Source§

const BIT_WIDTH: usize = 256usize

Source§

const ELEMENT_BIT_WIDTH: usize = 64usize

Source§

const LANES: usize = 4usize

Source§

const ZERO_ELEMENT: u64 = 0u64

Source§

const ONE_ELEMENT: u64 = 1u64

Source§

const MAX_ELEMENT: u64 = 18_446_744_073_709_551_615u64

Source§

const ZERO: Self = u64x4::ZERO

Source§

const MAX: Self = u64x4::MAX

Source§

type Element = u64

Source§

fn to_array(self) -> [u64; 4]

Source§

fn and_inplace(&mut self, rhs: &Self)

Source§

fn or_inplace(&mut self, rhs: &Self)

Source§

fn xor_inplace(&mut self, rhs: &Self)

Source§

impl BitBlock<8> for u16x8

Source§

const BIT_WIDTH: usize = 128usize

Source§

const ELEMENT_BIT_WIDTH: usize = 16usize

Source§

const LANES: usize = 8usize

Source§

const ZERO_ELEMENT: u16 = 0u16

Source§

const ONE_ELEMENT: u16 = 1u16

Source§

const MAX_ELEMENT: u16 = 65_535u16

Source§

const ZERO: Self = u16x8::ZERO

Source§

const MAX: Self = u16x8::MAX

Source§

type Element = u16

Source§

fn to_array(self) -> [u16; 8]

Source§

fn and_inplace(&mut self, rhs: &Self)

Source§

fn or_inplace(&mut self, rhs: &Self)

Source§

fn xor_inplace(&mut self, rhs: &Self)

Source§

impl BitBlock<8> for u32x8

Source§

const BIT_WIDTH: usize = 256usize

Source§

const ELEMENT_BIT_WIDTH: usize = 32usize

Source§

const LANES: usize = 8usize

Source§

const ZERO_ELEMENT: u32 = 0u32

Source§

const ONE_ELEMENT: u32 = 1u32

Source§

const MAX_ELEMENT: u32 = 4_294_967_295u32

Source§

const ZERO: Self = u32x8::ZERO

Source§

const MAX: Self = u32x8::MAX

Source§

type Element = u32

Source§

fn to_array(self) -> [u32; 8]

Source§

fn and_inplace(&mut self, rhs: &Self)

Source§

fn or_inplace(&mut self, rhs: &Self)

Source§

fn xor_inplace(&mut self, rhs: &Self)

Source§

impl BitBlock<16> for u8x16

Source§

const BIT_WIDTH: usize = 128usize

Source§

const ELEMENT_BIT_WIDTH: usize = 8usize

Source§

const LANES: usize = 16usize

Source§

const ZERO_ELEMENT: u8 = 0u8

Source§

const ONE_ELEMENT: u8 = 1u8

Source§

const MAX_ELEMENT: u8 = 255u8

Source§

const ZERO: Self = u8x16::ZERO

Source§

const MAX: Self = u8x16::MAX

Source§

type Element = u8

Source§

fn to_array(self) -> [u8; 16]

Source§

fn and_inplace(&mut self, rhs: &Self)

Source§

fn or_inplace(&mut self, rhs: &Self)

Source§

fn xor_inplace(&mut self, rhs: &Self)

Implementors§