WideSimd

Trait WideSimd 

Source
pub trait WideSimd: Copy {
    type Element: TensorElement + Float;
    type Array: AsRef<[Self::Element]> + AsMut<[Self::Element]> + Copy;

    const LANE: usize;
    const ONE: Self;
    const ZERO: Self;
    const HALF: Self;
    const NEG_INFINITY: Self;
    const INFINITY: Self;
Show 19 methods // Required methods fn new(arr: Self::Array) -> Self; fn from_slice(slice: &[Self::Element]) -> Self; fn splat(val: Self::Element) -> Self; fn to_array(self) -> Self::Array; fn as_array_ref(&self) -> &Self::Array; fn as_array_mut(&mut self) -> &mut Self::Array; fn abs(self) -> Self; fn max(self, rhs: Self) -> Self; fn min(self, rhs: Self) -> Self; fn exp(self) -> Self; fn sqrt(self) -> Self; fn recip(self) -> Self; fn recip_sqrt(self) -> Self; fn add(self, rhs: Self) -> Self; fn sub(self, rhs: Self) -> Self; fn mul(self, rhs: Self) -> Self; fn div(self, rhs: Self) -> Self; // Provided methods unsafe fn from_slice_unaligned(slice: &[Self::Element]) -> Self { ... } fn sum(self) -> Self::Element where Self::Element: Sum<Self::Element> { ... }
}

Required Associated Constants§

Source

const LANE: usize

Source

const ONE: Self

Source

const ZERO: Self

Source

const HALF: Self

Source

const NEG_INFINITY: Self

Source

const INFINITY: Self

Required Associated Types§

Required Methods§

Source

fn new(arr: Self::Array) -> Self

Source

fn from_slice(slice: &[Self::Element]) -> Self

Source

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

Source

fn to_array(self) -> Self::Array

Source

fn as_array_ref(&self) -> &Self::Array

Source

fn as_array_mut(&mut self) -> &mut Self::Array

Source

fn abs(self) -> Self

Source

fn max(self, rhs: Self) -> Self

Source

fn min(self, rhs: Self) -> Self

Source

fn exp(self) -> Self

Source

fn sqrt(self) -> Self

Source

fn recip(self) -> Self

Source

fn recip_sqrt(self) -> Self

Source

fn add(self, rhs: Self) -> Self

Source

fn sub(self, rhs: Self) -> Self

Source

fn mul(self, rhs: Self) -> Self

Source

fn div(self, rhs: Self) -> Self

Provided Methods§

Source

unsafe fn from_slice_unaligned(slice: &[Self::Element]) -> Self

Load from potentially unaligned memory without intermediate copy

§Safety

slice must have at least LANE elements

Source

fn sum(self) -> Self::Element
where Self::Element: Sum<Self::Element>,

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 WideSimd for f32x8

Source§

const LANE: usize = 8usize

Source§

const ONE: Self = Self::ONE

Source§

const ZERO: Self = Self::ZERO

Source§

const HALF: Self = Self::HALF

Source§

const NEG_INFINITY: Self

Source§

const INFINITY: Self

Source§

type Element = f32

Source§

type Array = [f32; 8]

Source§

fn new(arr: Self::Array) -> Self

Source§

fn from_slice(slice: &[f32]) -> Self

Source§

fn splat(val: f32) -> Self

Source§

fn to_array(self) -> Self::Array

Source§

fn as_array_ref(&self) -> &Self::Array

Source§

fn as_array_mut(&mut self) -> &mut Self::Array

Source§

fn abs(self) -> Self

Source§

fn max(self, rhs: Self) -> Self

Source§

fn min(self, rhs: Self) -> Self

Source§

fn exp(self) -> Self

Source§

fn sqrt(self) -> Self

Source§

fn recip(self) -> Self

Source§

fn recip_sqrt(self) -> Self

Source§

fn add(self, rhs: Self) -> Self

Source§

fn sub(self, rhs: Self) -> Self

Source§

fn mul(self, rhs: Self) -> Self

Source§

fn div(self, rhs: Self) -> Self

Source§

impl WideSimd for f64x4

Source§

const LANE: usize = 4usize

Source§

const ONE: Self = Self::ONE

Source§

const ZERO: Self = Self::ZERO

Source§

const HALF: Self = Self::HALF

Source§

const NEG_INFINITY: Self

Source§

const INFINITY: Self

Source§

type Element = f64

Source§

type Array = [f64; 4]

Source§

fn new(arr: Self::Array) -> Self

Source§

fn from_slice(slice: &[f64]) -> Self

Source§

fn splat(val: f64) -> Self

Source§

fn to_array(self) -> Self::Array

Source§

fn as_array_ref(&self) -> &Self::Array

Source§

fn as_array_mut(&mut self) -> &mut Self::Array

Source§

fn abs(self) -> Self

Source§

fn max(self, rhs: Self) -> Self

Source§

fn min(self, rhs: Self) -> Self

Source§

fn exp(self) -> Self

Source§

fn sqrt(self) -> Self

Source§

fn recip(self) -> Self

Source§

fn recip_sqrt(self) -> Self

Source§

fn add(self, rhs: Self) -> Self

Source§

fn sub(self, rhs: Self) -> Self

Source§

fn mul(self, rhs: Self) -> Self

Source§

fn div(self, rhs: Self) -> Self

Implementors§