|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Phase 15 example: long-running CA with periodic checkpoints and crash-style resume. More...
#include <charconv>#include <chrono>#include <cstddef>#include <cstdint>#include <filesystem>#include <iostream>#include <limits>#include <random>#include <string>#include <string_view>#include <system_error>#include <type_traits>#include <ca-checkpoint.H>#include <ca-traits.H>#include <tpl_ca_engine.H>#include <tpl_ca_lattice.H>#include <tpl_ca_neighborhood.H>#include <tpl_ca_rule.H>#include <tpl_ca_storage.H>Go to the source code of this file.
Functions | |
| int | main (int argc, char **argv) |
Phase 15 example: long-running CA with periodic checkpoints and crash-style resume.
The program runs Conway's Game of Life for a configurable number of steps, writing a binary checkpoint every every steps via Periodic_Checkpoint_Observer. It then simulates a crash by abandoning the engine, building a fresh one, and load-ing the most recent checkpoint to continue. The resumed run is compared cell-by-cell against an uninterrupted reference run to prove the bit-by-bit reproducibility of the resume protocol.
Run: ./ca_long_run_with_checkpoints_example [steps] [side] [every]
Defaults: steps=200, side=24, every=50.
Definition in file ca_long_run_with_checkpoints_example.cc.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 113 of file ca_long_run_with_checkpoints_example.cc.
References Aleph::and, Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::Resume_Token::header, Aleph::CA::load_checkpoint_into(), Aleph::CA::make_game_of_life_rule(), Aleph::CA::Resume_Token::source_path, Aleph::CA::Checkpoint_Header::step_count, and steps.