Skip to main content

VecTy

Enum VecTy 

Source
pub enum VecTy {
Show 15 variants M128, M128i, M128d, M256, M256i, M256d, M512, M512i, M512d, M128bh, M256bh, M512bh, M128h, M256h, M512h,
}
Expand description

Which x86 vector type a Ty::Vector is.

The name is the same in C and in core::arch, which is the whole point: the generated Rust says ::core::arch::x86_64::__m128i and Rust’s type has the size, the alignment and the calling convention C’s has.

Variants§

§

M128

__m128: four float lanes.

§

M128i

__m128i: sixteen bytes of integer lanes, whatever width.

§

M128d

__m128d: two double lanes.

§

M256

__m256: eight float lanes.

§

M256i

__m256i: thirty-two bytes of integer lanes.

§

M256d

__m256d: four double lanes.

§

M512

__m512: sixteen float lanes (AVX-512).

§

M512i

__m512i: sixty-four bytes of integer lanes.

§

M512d

__m512d: eight double lanes.

§

M128bh

__m128bh, __m256bh, __m512bh: bfloat16 lanes (AVX512-BF16). C only moves them between intrinsics; no scalar __bf16 is needed.

§

M256bh

§

M512bh

§

M128h

__m128h, __m256h, __m512h: half-precision lanes (AVX512-FP16), opaque in the same way: no _Float16 scalar is needed.

§

M256h

§

M512h

Implementations§

Source§

impl VecTy

Source

pub fn name(self) -> &'static str

The name, which C and core::arch spell the same way.

Source

pub fn bytes(self) -> u64

sizeof, which is also _Alignof: a vector type is aligned to its own width on every x86 ABI, and so is Rust’s.

Trait Implementations§

Source§

impl Clone for VecTy

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for VecTy

Source§

impl Debug for VecTy

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for VecTy

Source§

impl Hash for VecTy

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for VecTy

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for VecTy

Auto Trait Implementations§

§

impl Freeze for VecTy

§

impl RefUnwindSafe for VecTy

§

impl Send for VecTy

§

impl Sync for VecTy

§

impl Unpin for VecTy

§

impl UnsafeUnpin for VecTy

§

impl UnwindSafe for VecTy

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.