pub struct BoundedVl<Hart>(/* private fields */)
where
Hart: VectorHartConfig;Expand description
Vector length of a VectorConfig, which never exceeds VLEN.
vl <= VLMAX = LMUL * VLEN / SEW <= VLEN, since LMUL <= 8 and SEW >= 8. Constructors
enforce the bound, so unsafe code can rely on it for accessing a single vector register, like
mask registers with one bit per element.
Implementations§
Source§impl<Hart> BoundedVl<Hart>where
Hart: VectorHartConfig,
impl<Hart> BoundedVl<Hart>where
Hart: VectorHartConfig,
Sourcepub const fn new(vl: Vl) -> Option<Self>
pub const fn new(vl: Vl) -> Option<Self>
Create a new instance, returns None if vl exceeds VLEN
Trait Implementations§
impl<Hart> Copy for BoundedVl<Hart>where
Hart: VectorHartConfig + Copy,
Source§impl<Hart> Display for BoundedVl<Hart>where
Hart: VectorHartConfig,
impl<Hart> Display for BoundedVl<Hart>where
Hart: VectorHartConfig,
impl<Hart> Eq for BoundedVl<Hart>where
Hart: VectorHartConfig,
Auto Trait Implementations§
impl<Hart> Freeze for BoundedVl<Hart>where
PhantomData<Hart>: Freeze,
impl<Hart> RefUnwindSafe for BoundedVl<Hart>where
PhantomData<Hart>: RefUnwindSafe,
impl<Hart> Send for BoundedVl<Hart>where
PhantomData<Hart>: Send,
impl<Hart> Sync for BoundedVl<Hart>where
PhantomData<Hart>: Sync,
impl<Hart> Unpin for BoundedVl<Hart>where
PhantomData<Hart>: Unpin,
impl<Hart> UnsafeUnpin for BoundedVl<Hart>where
PhantomData<Hart>: UnsafeUnpin,
impl<Hart> UnwindSafe for BoundedVl<Hart>where
PhantomData<Hart>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more