Simd

Trait Simd 

Source
pub trait Simd {
    type Element;
    type LanesType;

    const LANES: usize;

    // Required methods
    fn splat(t: Self::Element) -> Self;
    fn as_array(&self) -> &[Self::Element];
    fn sum(&self) -> Self::Element;
}
Expand description

This is mostly copy-paste from packed_simd, where this trait is unfortunately sealed right now. In the future this might come from std::simd.

Required Associated Constants§

Source

const LANES: usize

The number of elements in the SIMD vector.

Required Associated Types§

Source

type Element

Element type of the SIMD vector

Source

type LanesType

The type: [u32; Self::N].

Required Methods§

Source

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

Added for convenience

Source

fn as_array(&self) -> &[Self::Element]

Added for convenience

Source

fn sum(&self) -> 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.

Implementors§

Source§

impl Simd for f32x4

Source§

impl Simd for f32x8

Source§

impl Simd for f64x2

Source§

impl Simd for f64x4

Source§

impl Simd for i8x16

Source§

const LANES: usize = 16usize

Source§

type Element = i8

Source§

type LanesType = [i8; 16]

Source§

impl Simd for i8x32

Source§

const LANES: usize = 32usize

Source§

type Element = i8

Source§

type LanesType = [i8; 32]

Source§

impl Simd for i16x8

Source§

impl Simd for i16x16

Source§

impl Simd for i32x4

Source§

impl Simd for i32x8

Source§

impl Simd for i64x2

Source§

impl Simd for i64x4

Source§

impl Simd for u8x16

Source§

const LANES: usize = 16usize

Source§

type Element = u8

Source§

type LanesType = [u8; 16]

Source§

impl Simd for u16x8

Source§

impl Simd for u16x16

Source§

impl Simd for u32x4

Source§

impl Simd for u32x8

Source§

impl Simd for u64x2

Source§

impl Simd for u64x4