Skip to main content

VRegSegmentGroup

Struct VRegSegmentGroup 

Source
pub struct VRegSegmentGroup<Hart>
where Hart: VectorHartConfig,
{ /* private fields */ }
Expand description

Register group of a segment load or store: nf fields, each a VRegGroup, in consecutive register groups starting with the first one.

Implementations§

Source§

impl<Hart> VRegSegmentGroup<Hart>
where Hart: VectorHartConfig,

Source

pub const fn new(first: VRegGroup<Hart>, nf: Nf) -> Option<Self>

Segment group of nf fields, the first of which is first.

Returns None if NFIELDS * EMUL exceeds 8 or the fields don’t fit into the register file, each of which makes an instruction illegal.

Source

pub const fn single(group: VRegGroup<Hart>) -> Self

Group of a single field, as used by loads and stores that are not segment ones

Source

pub const fn first(self) -> VRegGroup<Hart>

The first field

Source

pub const fn nf(self) -> Nf

Number of fields

Source

pub const fn field(self, field: u8) -> Option<VRegGroup<Hart>>

Register group of field field, None if it is not below the number of fields

Source

pub fn fields(self) -> impl Iterator<Item = VRegGroup<Hart>>

Register groups of all fields in order

Source

pub fn elements(self, start: u16) -> impl Iterator<Item = SegmentElement<Hart>>

Body elements start..vl, each of which gives access to its fields.

The index of an element is below vl by construction, so access to its fields doesn’t need the compiler to prove anything about indices, unlike VectorRegisterFile::read().

Source

pub fn with_index( self, index: VRegGroup<Hart>, ) -> Option<IndexedSegmentGroup<Hart>>

This group together with the group of indices of an indexed load or store.

Returns None if index has a different vl, which never happens for groups created from the same configuration.

Trait Implementations§

Source§

impl<Hart> Clone for VRegSegmentGroup<Hart>
where Hart: VectorHartConfig + Clone,

Source§

fn clone(&self) -> VRegSegmentGroup<Hart>

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<Hart> Copy for VRegSegmentGroup<Hart>
where Hart: VectorHartConfig + Copy,

Source§

impl<Hart> Debug for VRegSegmentGroup<Hart>
where Hart: VectorHartConfig + Debug,

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<Hart> Freeze for VRegSegmentGroup<Hart>
where VRegGroup<Hart>: Freeze,

§

impl<Hart> RefUnwindSafe for VRegSegmentGroup<Hart>
where VRegGroup<Hart>: RefUnwindSafe,

§

impl<Hart> Send for VRegSegmentGroup<Hart>
where VRegGroup<Hart>: Send,

§

impl<Hart> Sync for VRegSegmentGroup<Hart>
where VRegGroup<Hart>: Sync,

§

impl<Hart> Unpin for VRegSegmentGroup<Hart>
where VRegGroup<Hart>: Unpin,

§

impl<Hart> UnsafeUnpin for VRegSegmentGroup<Hart>
where VRegGroup<Hart>: UnsafeUnpin,

§

impl<Hart> UnwindSafe for VRegSegmentGroup<Hart>
where VRegGroup<Hart>: UnwindSafe,

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, <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.