sonic_simd

Trait Simd

Source
pub trait Simd: Sized {
    type Element;
    type Mask: Mask;

    const LANES: usize;

    // Required methods
    unsafe fn loadu(ptr: *const u8) -> Self;
    unsafe fn storeu(&self, ptr: *mut u8);
    fn eq(&self, rhs: &Self) -> Self::Mask;
    fn splat(elem: Self::Element) -> Self;
    fn gt(&self, rhs: &Self) -> Self::Mask;
    fn le(&self, rhs: &Self) -> Self::Mask;

    // Provided methods
    unsafe fn from_slice_unaligned_unchecked(slice: &[u8]) -> Self { ... }
    unsafe fn write_to_slice_unaligned_unchecked(&self, slice: &mut [u8]) { ... }
}
Expand description

Portbal SIMD traits

Required Associated Constants§

Required Associated Types§

Required Methods§

Source

unsafe fn loadu(ptr: *const u8) -> Self

§Safety
Source

unsafe fn storeu(&self, ptr: *mut u8)

§Safety
Source

fn eq(&self, rhs: &Self) -> Self::Mask

Source

fn splat(elem: Self::Element) -> Self

Source

fn gt(&self, rhs: &Self) -> Self::Mask

greater than

Source

fn le(&self, rhs: &Self) -> Self::Mask

less or equal

Provided Methods§

Source

unsafe fn from_slice_unaligned_unchecked(slice: &[u8]) -> Self

§Safety
Source

unsafe fn write_to_slice_unaligned_unchecked(&self, slice: &mut [u8])

§Safety

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.

Implementors§