Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::CA::Checkpointable_Engine Concept Reference

Concept: engine that exposes the minimum surface needed by checkpoint save/load. More...

#include <ca-checkpoint.H>

Concept definition

template<typename E>
and requires { typename E::rule_type; }
and requires(E &e, std::size_t s) {
{ e.frame() } -> std::convertible_to<const typename E::lattice_type &>;
{ e.steps_run() } -> std::convertible_to<std::size_t>;
{ e.rule() } -> std::convertible_to<typename E::rule_type &>;
{ e.write_lattice() } -> std::convertible_to<typename E::lattice_type &>;
e.set_step_count(s);
}
Concept: engine that exposes the minimum surface needed by checkpoint save/load.
Concept: lattice exposing the standard CA layout interface.
and
Check uniqueness with explicit hash + equality functors.

Detailed Description

Concept: engine that exposes the minimum surface needed by checkpoint save/load.

The contract covers both directions of the round-trip:

  • frame() — read access used by save_checkpoint.
  • steps_run() — current step counter, serialised verbatim.
  • rule() — needed to detect Has_Master_Seed and restore the master RNG seed on load.
  • write_lattice() — mutable handle the loader fills cell by cell.
  • set_step_count(s) — restore the recorded step counter on load.

Both Synchronous_Engine and Async_Engine satisfy this contract out of the box; engines lacking any of these accessors fail at the concept boundary (cleaner than a deep template error).

Template Parameters
Eengine type.

Definition at line 472 of file ca-checkpoint.H.