Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
ca_long_run_with_checkpoints_example.cc File Reference

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>
Include dependency graph for ca_long_run_with_checkpoints_example.cc:

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Detailed Description

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.

Function Documentation

◆ main()