Enum rsim::processor::isa_mods::vector::Lmul[][src]

pub enum Lmul {
    eEighth,
    eQuarter,
    eHalf,
    e1,
    e2,
    e4,
    e8,
}

Length-Mul enum

RISC-V V allows programs to group vector registers together for greater theoretical parallelism. For example, configuring LMUL=8 means that subsequent vector instructions will operate on 8 vector registers worth of elements.

This requires care if you are resizing elements. An example program in v1.0 of the specification (section 6.4, p28) sets LMUL=4, vtype=16-bit for initial operations. This will operate on LMUL * VLEN / SEW = 4 * VLEN / 16 = VLEN/4 elements.

It then widens the elements to 32-bit using a widening vector multiply. To ensure the following instructions operate on the same number of elements, they reconfigure with doubled LMUL. LMUL = 8, vtype = 32-bit => LMUL * VLEN / SEW = 8 * VLEN / 32 = VLEN/4 elements, same as before.

Variants

eEighth
eQuarter
eHalf
e1
e2
e4
e8

Implementations

impl Lmul[src]

pub fn num_registers_consumed(&self) -> u8[src]

Returns the number of vector registers a group actually consumes with this Lmul.

Trait Implementations

impl Clone for Lmul[src]

impl Debug for Lmul[src]

impl PartialEq<Lmul> for Lmul[src]

impl Copy for Lmul[src]

impl Eq for Lmul[src]

impl StructuralEq for Lmul[src]

impl StructuralPartialEq for Lmul[src]

Auto Trait Implementations

impl RefUnwindSafe for Lmul

impl Send for Lmul

impl Sync for Lmul

impl Unpin for Lmul

impl UnwindSafe for Lmul

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.