Skip to content
API REFERENCEUsage guides →

cellpack::loader::RingLayout ​

struct

Module contract · All interfaces

At a glance ​

pub struct RingLayout {
    pub slots: u32,
    pub slot_cells: u32,
    pub world: u32,
    pub cell_bytes: Vec<u32>,
}

Slots of positions, each holding every schema’s region. A slot’s remaining output counter is a u32, so slot_cells × schemas must fit in one.

Fields and variants ​

slots ​

slots: u32

Slot count; batch b uses slot b % slots.

slot_cells ​

slot_cells: u32

Positions per slot: one compact region per schema in each slot.

world ​

world: u32

Consumer ranks; rank r consumes the batches b with b % world == r.

cell_bytes ​

cell_bytes: Vec<u32>

Bytes of one cell’s output, per schema in loader order.

Member index ​

6 of 6 members

  • regionsRegion offsets within a slot, and the slot stride: each schema’s slot_cells × cell_bytes region starts at a REGION_ALIGN multiple within the slot, and the stride (all regions plus the tail padding) is a multiple of SLOT_ALIGN , so slots of a page-aligned data region never share a page.
  • slot_strideBytes from one slot’s start to the next.
  • bytesBytes of one contiguous mapping: control and data together.
  • control_bytesBytes of control memory: header, slot headers and participant rows.
  • data_bytesBytes of data storage, padding of the last slot included.
  • data_min_bytesThe least data storage: the last slot need not hold its padding.

Methods and associated constants ​

regions ​

pub fn regions(&self) -> Option<(Vec<usize>, usize)>

Region offsets within a slot, and the slot stride: each schema’s slot_cells × cell_bytes region starts at a REGION_ALIGN multiple within the slot, and the stride (all regions plus the tail padding) is a multiple of SLOT_ALIGN, so slots of a page-aligned data region never share a page.

slot_stride ​

pub fn slot_stride(&self) -> Result<usize>

Bytes from one slot’s start to the next.

bytes ​

pub fn bytes(&self) -> Result<usize>

Bytes of one contiguous mapping: control and data together.

control_bytes ​

pub fn control_bytes(&self) -> Result<usize>

Bytes of control memory: header, slot headers and participant rows.

data_bytes ​

pub fn data_bytes(&self) -> Result<usize>

Bytes of data storage, padding of the last slot included.

data_min_bytes ​

pub fn data_min_bytes(&self) -> Result<usize>

The least data storage: the last slot need not hold its padding.

Implemented traits ​

impl Clone for RingLayout
impl Debug for RingLayout

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