pub struct Pmu {
pub spec: PmuSpec,
pub mode: BankingMode,
/* private fields */
}Expand description
Banked storage with a flat-address interface: the executable meaning of the banking modes.
Fields§
§spec: PmuSpec§mode: BankingModeImplementations§
Source§impl Pmu
impl Pmu
pub fn new(spec: PmuSpec, mode: BankingMode) -> Pmu
Sourcepub fn slot(&self, addr: usize) -> (usize, usize)
pub fn slot(&self, addr: usize) -> (usize, usize)
(bank, offset) of a flat address under a non-duplicating mode: the bank from bank_of, the
offset = the address’s rank among the addresses that share its bank — an injective map onto the
bank’s words for every address below the capacity.
pub fn write(&mut self, addr: usize, v: i64)
pub fn read(&self, addr: usize) -> i64
Sourcepub fn vector_read(&self, access: &AffineAccess) -> (Vec<i64>, usize)
pub fn vector_read(&self, access: &AffineAccess) -> (Vec<i64>, usize)
A vector read: the lane values and the cycles it costs (the bank conflicts).
Sourcepub fn vector_write(&mut self, access: &AffineAccess, vals: &[i64]) -> usize
pub fn vector_write(&mut self, access: &AffineAccess, vals: &[i64]) -> usize
A vector write: cycles it costs (bank conflicts; a duplicated write is broadcast, one cycle per lane round since every bank must absorb every lane).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Pmu
impl RefUnwindSafe for Pmu
impl Send for Pmu
impl Sync for Pmu
impl Unpin for Pmu
impl UnsafeUnpin for Pmu
impl UnwindSafe for Pmu
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.