pub trait Simd: Copy + Debug {
type Array: AsRef<[Self::Elem]> + Copy + Debug + IntoIterator<Item = Self::Elem> + PartialEq<Self::Array> + Index<usize, Output = Self::Elem> + IndexMut<usize, Output = Self::Elem>;
type Elem: Elem;
type Mask: Mask;
type Isa: Isa;
// Required methods
fn to_bits(self) -> <Self::Isa as Isa>::Bits;
fn from_bits(bits: <Self::Isa as Isa>::Bits) -> Self;
fn to_array(self) -> Self::Array;
// Provided methods
fn reinterpret_cast<T>(self) -> T
where T: Simd<Isa = Self::Isa> { ... }
fn same_cast<T>(self) -> T
where T: Simd<Elem = Self::Elem, Isa = Self::Isa> { ... }
}Expand description
SIMD vector type.
Required Associated Types§
Required Methods§
Sourcefn to_bits(self) -> <Self::Isa as Isa>::Bits
fn to_bits(self) -> <Self::Isa as Isa>::Bits
Convert this SIMD vector to the common “bits” type used by all vectors in this family.
Provided Methods§
Sourcefn reinterpret_cast<T>(self) -> T
fn reinterpret_cast<T>(self) -> T
Reinterpret the bits of this vector as another vector from the same family.
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.