[][src]Trait simba::simd::SimdValue

pub trait SimdValue: Sized {
    type Element: SimdValue<Element = Self::Element, SimdBool = bool>;
    type SimdBool: SimdBool;
    fn lanes() -> usize;
fn splat(val: Self::Element) -> Self;
fn extract(&self, i: usize) -> Self::Element;
unsafe fn extract_unchecked(&self, i: usize) -> Self::Element;
fn replace(&mut self, i: usize, val: Self::Element);
unsafe fn replace_unchecked(&mut self, i: usize, val: Self::Element);
fn select(self, cond: Self::SimdBool, other: Self) -> Self; fn map_lanes(self, f: impl Fn(Self::Element) -> Self::Element) -> Self
    where
        Self: Clone
, { ... }
fn zip_map_lanes(
        self,
        b: Self,
        f: impl Fn(Self::Element, Self::Element) -> Self::Element
    ) -> Self
    where
        Self: Clone
, { ... } }

Trait implemented by Simd types as well as scalar types (f32, u32, etc.).

Associated Types

type Element: SimdValue<Element = Self::Element, SimdBool = bool>

The type of the elements of each lane of this SIMD value.

type SimdBool: SimdBool

Loading content...

Required methods

fn lanes() -> usize

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

fn extract(&self, i: usize) -> Self::Element

unsafe fn extract_unchecked(&self, i: usize) -> Self::Element

fn replace(&mut self, i: usize, val: Self::Element)

unsafe fn replace_unchecked(&mut self, i: usize, val: Self::Element)

fn select(self, cond: Self::SimdBool, other: Self) -> Self

Loading content...

Provided methods

fn map_lanes(self, f: impl Fn(Self::Element) -> Self::Element) -> Self where
    Self: Clone

fn zip_map_lanes(
    self,
    b: Self,
    f: impl Fn(Self::Element, Self::Element) -> Self::Element
) -> Self where
    Self: Clone

Loading content...

Implementations on Foreign Types

impl<N: SimdValue> SimdValue for Complex<N>[src]

type Element = Complex<N::Element>

type SimdBool = N::SimdBool

impl SimdValue for bool[src]

type Element = bool

type SimdBool = bool

impl SimdValue for u8[src]

type Element = u8

type SimdBool = bool

impl SimdValue for u16[src]

type Element = u16

type SimdBool = bool

impl SimdValue for u32[src]

type Element = u32

type SimdBool = bool

impl SimdValue for u64[src]

type Element = u64

type SimdBool = bool

impl SimdValue for u128[src]

type Element = u128

type SimdBool = bool

impl SimdValue for usize[src]

type Element = usize

type SimdBool = bool

impl SimdValue for i8[src]

type Element = i8

type SimdBool = bool

impl SimdValue for i16[src]

type Element = i16

type SimdBool = bool

impl SimdValue for i32[src]

type Element = i32

type SimdBool = bool

impl SimdValue for i64[src]

type Element = i64

type SimdBool = bool

impl SimdValue for i128[src]

type Element = i128

type SimdBool = bool

impl SimdValue for isize[src]

type Element = isize

type SimdBool = bool

impl SimdValue for f32[src]

type Element = f32

type SimdBool = bool

impl SimdValue for f64[src]

type Element = f64

type SimdBool = bool

Loading content...

Implementors

Loading content...