pub struct Reg { /* private fields */ }
Implementations§
Source§impl Reg
impl Reg
Sourcepub fn from_bits(nbits: usize, hi_bits: &[usize]) -> Self
pub fn from_bits(nbits: usize, hi_bits: &[usize]) -> Self
constructor that takes the indices of the high bits
Sourcepub fn hi_bits(&self) -> Vec<usize>
pub fn hi_bits(&self) -> Vec<usize>
return the high bits of the register as a vector of indices.
Sourcepub fn var_put(&mut self, v: VID, val: bool)
pub fn var_put(&mut self, v: VID, val: bool)
assign value of bit with the given variable’s index
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
true when the number of bits is 0. (mostly because clippy complains about len() without is_empty())
Sourcepub fn as_usize_rev(&self) -> usize
pub fn as_usize_rev(&self) -> usize
build a usize from the least significant bits of the register, in reverse order.
pub fn permute_bits(&self, pv: &[usize]) -> Self
Trait Implementations§
Source§impl Ord for Reg
impl Ord for Reg
Source§impl PartialOrd for Reg
impl PartialOrd for Reg
impl Eq for Reg
impl StructuralPartialEq for Reg
Auto Trait Implementations§
impl Freeze for Reg
impl RefUnwindSafe for Reg
impl Send for Reg
impl Sync for Reg
impl Unpin for Reg
impl UnwindSafe for Reg
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