Skip to main content

U8SimdVec

Trait U8SimdVec 

Source
pub trait U8SimdVec:
    Sized
    + Copy
    + Debug
    + Send
    + Sync {
    type Descriptor: SimdDescriptor;

    const LEN: usize;

    // Required methods
    fn load(d: Self::Descriptor, mem: &[u8]) -> Self;
    fn splat(d: Self::Descriptor, v: u8) -> Self;
    fn store(&self, mem: &mut [u8]);
    fn store_interleaved_2(a: Self, b: Self, dest: &mut [u8]);
    fn store_interleaved_3(a: Self, b: Self, c: Self, dest: &mut [u8]);
    fn store_interleaved_4(a: Self, b: Self, c: Self, d: Self, dest: &mut [u8]);
}

Required Associated Constants§

Required Associated Types§

Required Methods§

Source

fn load(d: Self::Descriptor, mem: &[u8]) -> Self

Source

fn splat(d: Self::Descriptor, v: u8) -> Self

Source

fn store(&self, mem: &mut [u8])

Source

fn store_interleaved_2(a: Self, b: Self, dest: &mut [u8])

Stores two vectors interleaved: [a0, b0, a1, b1, a2, b2, …]. Requires dest.len() >= 2 * Self::LEN or it will panic.

Source

fn store_interleaved_3(a: Self, b: Self, c: Self, dest: &mut [u8])

Stores three vectors interleaved: [a0, b0, c0, a1, b1, c1, …]. Requires dest.len() >= 3 * Self::LEN or it will panic.

Source

fn store_interleaved_4(a: Self, b: Self, c: Self, d: Self, dest: &mut [u8])

Stores four vectors interleaved: [a0, b0, c0, d0, a1, b1, c1, d1, …]. Requires dest.len() >= 4 * Self::LEN or it will panic.

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 U8SimdVec for u8

Source§

const LEN: usize = 1

Source§

type Descriptor = ScalarDescriptor

Source§

fn load(_d: Self::Descriptor, mem: &[u8]) -> Self

Source§

fn splat(_d: Self::Descriptor, v: u8) -> Self

Source§

fn store(&self, mem: &mut [u8])

Source§

fn store_interleaved_2(a: Self, b: Self, dest: &mut [u8])

Source§

fn store_interleaved_3(a: Self, b: Self, c: Self, dest: &mut [u8])

Source§

fn store_interleaved_4(a: Self, b: Self, c: Self, d: Self, dest: &mut [u8])

Implementors§