Skip to main content

VectorArrangement

Enum VectorArrangement 

Source
pub enum VectorArrangement {
    B8,
    B16,
    H4,
    H8,
    S2,
    S4,
    D1,
    D2,
    SveB,
    SveH,
    SveS,
    SveD,
}
Expand description

AArch64 vector arrangement specifier.

Describes how a 128-bit (or 64-bit) SIMD register is divided into lanes. Used with NEON/ASIMD instructions like ADD V0.4S, V1.4S, V2.4S.

Variants§

§

B8

8 bytes (64-bit: 8×B)

§

B16

16 bytes (128-bit: 16×B)

§

H4

4 half-words (64-bit: 4×H)

§

H8

8 half-words (128-bit: 8×H)

§

S2

2 single-words (64-bit: 2×S)

§

S4

4 single-words (128-bit: 4×S)

§

D1

1 double-word (64-bit: 1×D)

§

D2

2 double-words (128-bit: 2×D)

§

SveB

SVE byte elements (.B).

§

SveH

SVE half-word elements (.H).

§

SveS

SVE single-word elements (.S).

§

SveD

SVE double-word elements (.D).

Implementations§

Source§

impl VectorArrangement

Source

pub fn parse(s: &str) -> Option<Self>

Parse a vector arrangement specifier string (e.g., “8b”, “16b”, “4h”). Case-insensitive, zero heap allocations.

Source

pub fn element_bits(self) -> u32

Lane element size in bits.

Source

pub fn total_bits(self) -> u32

Total vector width in bits (64 or 128 for NEON, 0 for SVE scalable).

Source

pub fn lane_count(self) -> u32

Number of lanes (0 for SVE scalable arrangements).

Source

pub fn sve_size(self) -> Option<u32>

SVE element size encoding (2-bit sz field): B=0, H=1, S=2, D=3. Returns None for non-SVE arrangements.

Trait Implementations§

Source§

impl Clone for VectorArrangement

Source§

fn clone(&self) -> VectorArrangement

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 VectorArrangement

Source§

impl Debug for VectorArrangement

Source§

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

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

impl Display for VectorArrangement

Source§

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

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

impl Eq for VectorArrangement

Source§

impl PartialEq for VectorArrangement

Source§

fn eq(&self, other: &VectorArrangement) -> 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 VectorArrangement

Auto Trait Implementations§

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.