Skip to content
API REFERENCEUsage guides →

cellpack::loader::Shuffle ​

struct

Module contract · All interfaces

At a glance ​

pub struct Shuffle { /* private fields */ }

Epochs of shuffled cells: each epoch visits every position (or every entry of a subset) once, in its own pseudorandom order. With blocks, an epoch shuffles blocks of consecutive cells, and shuffles cells within each group of consecutive (shuffled) blocks: local reads, as from chunked shuffle buffers.

Member index ​

3 of 3 members

  • newEvery cell of 0..cells , epochs times.
  • subsetThe entries of cells (repeats allowed), epochs times.
  • blocksShuffles blocks of block consecutive entries, and entries within groups of group blocks; block is capped at the entry count.

Methods and associated constants ​

new ​

pub fn new(cells: u64, epochs: u64, seed: u64) -> Result<Self>

Every cell of 0..cells, epochs times.

subset ​

pub fn subset(cells: Vec<CellId>, epochs: u64, seed: u64) -> Result<Self>

The entries of cells (repeats allowed), epochs times.

blocks ​

pub fn blocks(self, block: u64, group: u64) -> Result<Self>

Shuffles blocks of block consecutive entries, and entries within groups of group blocks; block is capped at the entry count.

Implemented traits ​

impl Accesses for Shuffle
impl Clone for Shuffle

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