Skip to content
API REFERENCEUsage guides →

cellpack::opt::Plan ​

struct

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) -> &PlanSummary

The serial replay’s counts; all zero for a plan read from a file until a loader verifies it (prepare or replay).

distance ​

pub fn distance(&self) -> u64

The reuse gap D in accesses.

schemas ​

pub fn schemas(&self) -> u64

Schemas of the graph the plan was compiled for.

slot_cells ​

pub fn slot_cells(&self) -> u64

Positions per output slot of that graph.

len ​

pub fn len(&self) -> u64

Accesses in the sequence.

is_empty ​

pub fn is_empty(&self) -> bool

Whether the plan covers no access.

cache_bytes ​

pub fn cache_bytes(&self) -> usize

Cache bytes it was compiled with.

cache_frames ​

pub fn cache_frames(&self) -> u32

Cache frames the plan was compiled with; frame ids lie below it.

cost ​

pub fn cost(&self) -> Option<&CostModel>

The cost model it was compiled with, if any.

reuse_gap ​

pub fn reuse_gap(&self) -> u64

The reuse gap in slots.

residencies ​

pub fn residencies(&self) -> &[Residency]

Residencies in admission order.

frames_of ​

pub fn frames_of(&self, r: &Residency) -> &[u32]

The global frame ids a residency holds, in order.

write ​

pub fn write(&self, path: impl AsRef<Path>) -> Result<()>

Writes the plan file at path.

to_bytes ​

pub fn to_bytes(&self) -> Vec<u8> ⓘ

The plan file’s bytes.

open ​

pub fn open(path: impl AsRef<Path>) -> Result<Self>

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.

Definition