Appearance
cellpack::opt::Plan
Module contract · All interfaces
At a glance
pub struct Plan { /* private fields */ }A cache plan: the residencies a compilation chose, the frames they hold, and what they were compiled for.
Member index
16 of 16 members
summaryThe serial replay’s counts; all zero for a plan read from a file until a loader verifies it ( prepare or replay ).distanceThe reuse gap D in accesses.schemasSchemas of the graph the plan was compiled for.slot_cellsPositions per output slot of that graph.lenAccesses in the sequence.is_emptyWhether the plan covers no access.cache_bytesCache bytes it was compiled with.cache_framesCache frames the plan was compiled with; frame ids lie below it.costThe cost model it was compiled with, if any.reuse_gapThe reuse gap in slots.residenciesResidencies in admission order.frames_ofThe global frame ids a residency holds, in order.writeWrites the plan file at path .to_bytesThe plan file’s bytes.openReads a plan file; it is checked against the graph and accesses it is run with when it is verified ( prepare or replay ).from_bytesReads Plan::to_bytes .
Methods and associated constants
summary
pub fn summary(&self) -> &PlanSummaryThe serial replay’s counts; all zero for a plan read from a file until a loader verifies it (prepare or replay).
distance
The reuse gap D in accesses.
schemas
Schemas of the graph the plan was compiled for.
slot_cells
pub fn slot_cells(&self) -> u64Positions per output slot of that graph.
len
Accesses in the sequence.
is_empty
Whether the plan covers no access.
cache_bytes
pub fn cache_bytes(&self) -> usizeCache bytes it was compiled with.
cache_frames
pub fn cache_frames(&self) -> u32Cache frames the plan was compiled with; frame ids lie below it.
cost
The cost model it was compiled with, if any.
reuse_gap
The reuse gap in slots.
residencies
pub fn residencies(&self) -> &[Residency]Residencies in admission order.
frames_of
The global frame ids a residency holds, in order.
write
Writes the plan file at path.
to_bytes
The plan file’s bytes.
open
Reads a plan file; it is checked against the graph and accesses it is run with when it is verified (prepare or replay).
from_bytes
pub fn from_bytes(bytes: &[u8]) -> Result<Self>Reads Plan::to_bytes.
Contract reference
See the module reference for semantic input/output rules, units, allocation, mutation, failure behavior, and lifetime requirements. Declarations and documented members are synchronized from the crate source.