#[repr(u8)]pub enum Vsew {
E8 = 8,
E16 = 16,
E32 = 32,
E64 = 64,
}Expand description
Selected element width (SEW).
Encoded in vtype[5:3] as vsew. SEW = 8 * 2^vsew.
Variants§
E8 = 8
SEW = 8 bits (vsew = 0b000)
E16 = 16
SEW = 16 bits (vsew = 0b001)
E32 = 32
SEW = 32 bits (vsew = 0b010)
E64 = 64
SEW = 64 bits (vsew = 0b011)
Implementations§
Source§impl Vsew
impl Vsew
Sourcepub const fn from_bits(bits: u8) -> Option<Self>
pub const fn from_bits(bits: u8) -> Option<Self>
Decode from the 3-bit vsew field. Returns None for reserved encodings.
Sourcepub const fn double_width(self) -> Option<Self>
pub const fn double_width(self) -> Option<Self>
Get the double element width, if available
Sourcepub const fn divide_by_factor(self, factor: VsewFactor) -> Option<Self>
pub const fn divide_by_factor(self, factor: VsewFactor) -> Option<Self>
Divide Vsew width by a given factor
Sourcepub const fn bits_width(self) -> u8
pub const fn bits_width(self) -> u8
Element width in bits
Sourcepub const fn bytes_width(self) -> u8
pub const fn bytes_width(self) -> u8
Element width in bytes
Trait Implementations§
impl Copy for Vsew
impl Eq for Vsew
impl StructuralPartialEq for Vsew
Auto Trait Implementations§
impl Freeze for Vsew
impl RefUnwindSafe for Vsew
impl Send for Vsew
impl Sync for Vsew
impl Unpin for Vsew
impl UnsafeUnpin for Vsew
impl UnwindSafe for Vsew
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