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,
impl<Hart> VRegSegmentGroup<Hart>where
Hart: VectorHartConfig,
Sourcepub const fn new(first: VRegGroup<Hart>, nf: Nf) -> Option<Self>
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.
Sourcepub const fn single(group: VRegGroup<Hart>) -> Self
pub const fn single(group: VRegGroup<Hart>) -> Self
Group of a single field, as used by loads and stores that are not segment ones
Sourcepub const fn field(self, field: u8) -> Option<VRegGroup<Hart>>
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
Sourcepub fn fields(self) -> impl Iterator<Item = VRegGroup<Hart>>
pub fn fields(self) -> impl Iterator<Item = VRegGroup<Hart>>
Register groups of all fields in order
Sourcepub fn elements(self, start: u16) -> impl Iterator<Item = SegmentElement<Hart>>
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().
Sourcepub fn with_index(
self,
index: VRegGroup<Hart>,
) -> Option<IndexedSegmentGroup<Hart>>
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,
impl<Hart> Clone for VRegSegmentGroup<Hart>where
Hart: VectorHartConfig + Clone,
Source§fn clone(&self) -> VRegSegmentGroup<Hart>
fn clone(&self) -> VRegSegmentGroup<Hart>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more