Skip to main content

checkpoint_slot

Function checkpoint_slot 

Source
fn checkpoint_slot(index: usize, stride: usize) -> Option<usize>
Expand description

Returns the array slot that holds the offset of index, if index is one of the checkpoints we keep.

Slot n is read back as the start of index (n + 1) * stride, so an index past the last checkpoint has to be dropped rather than clamped into it.