Trait SIMDVector

Source
pub trait SIMDVector
where Self: From<Self::Underlying> + Default + Neg<Output = Self> + Add<Self> + Add<Self::Element> + Sub<Self> + Sub<Self::Element> + Mul<Self> + Mul<Self::Element> + Div<Self> + Div<Self::Element> + AddAssign<Self> + AddAssign<Self::Element> + SubAssign<Self> + SubAssign<Self::Element> + MulAssign<Self> + MulAssign<Self::Element> + DivAssign<Self> + DivAssign<Self::Element>, Self::Underlying: From<Self>, Self::Element: Add<Self> + Sub<Self> + Mul<Self> + Div<Self>,
{ type Underlying; type Element; const ELEMENTS: usize; }
Expand description

Represents a packed vector containing ELEMENTS values of type Element.

Converting Element to SIMDVector works as broadcast, i.e. assigns the converting value to all elements of the vector.

Default::default initializes all elements of vector with zero.

All arithmetic operations (Neg, Add, etc) are applied vertically, i.e. “elementwise”.

Required Associated Constants§

Source

const ELEMENTS: usize

Number of elements in SIMDVector.

Required Associated Types§

Source

type Underlying

Underlying intrinsic type or tuple of types implementing SIMDVector.

Source

type Element

Type of a single element of SIMDVector.

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§