Skip to content
API REFERENCEUsage guides →

cellpack::prof::Snapshots ​

struct

Module contract · All interfaces

At a glance ​

pub struct Snapshots { /* private fields */ }

Snapshot slots: one per thread, each a seqlock over plain words, so a reader never blocks a writer.

Member index ​

3 of 3 members

  • newthreads slots of words zeroed words each.
  • publishPublishes thread i ’s words (only that thread writes its slot). The odd sequence between the two stores marks the words as in flux.
  • sumThe words of every slot, summed.

Methods and associated constants ​

new ​

pub fn new(threads: usize, words: usize) -> Self

threads slots of words zeroed words each.

publish ​

pub fn publish(&self, i: usize, words: impl Iterator<Item = u64>)

Publishes thread i’s words (only that thread writes its slot). The odd sequence between the two stores marks the words as in flux.

sum ​

pub fn sum(&self) -> Vec<u64>

The words of every slot, summed.

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