pub struct ActivationPlan {
pub assignments: HashMap<ValueId, SlotId>,
pub slots: Vec<SlotInfo>,
pub peak_bytes: usize,
pub num_slots: usize,
pub naive_bytes: usize,
pub savings_ratio: f64,
}Expand description
A computed activation memory plan: which slot backs each value, and how big the whole activation arena must be.
Fields§
§assignments: HashMap<ValueId, SlotId>Buffer owner value → the slot that backs it. Views are absent (they own no slot; they alias their source’s slot).
slots: Vec<SlotInfo>Every slot and its capacity, in ascending id order.
peak_bytes: usizeTotal bytes the executor must allocate = sum of slot capacities. This is the concurrent peak activation footprint after buffer sharing.
num_slots: usizeNumber of distinct slots.
naive_bytes: usizeBytes the naive “one buffer per value forever” strategy would use = sum of every owner’s size. Exposed to quantify the win.
savings_ratio: f64Fraction of activation memory saved vs. naive: 1 - peak/naive (in
[0, 1]; 0.0 when naive_bytes == 0).
Trait Implementations§
Source§impl Clone for ActivationPlan
impl Clone for ActivationPlan
Source§fn clone(&self) -> ActivationPlan
fn clone(&self) -> ActivationPlan
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ActivationPlan
impl RefUnwindSafe for ActivationPlan
impl Send for ActivationPlan
impl Sync for ActivationPlan
impl Unpin for ActivationPlan
impl UnsafeUnpin for ActivationPlan
impl UnwindSafe for ActivationPlan
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