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

Phase 17 showcase: compression, async writer and delta snapshots for ca-checkpoint.H. More...

#include <charconv>
#include <chrono>
#include <cstddef>
#include <cstdint>
#include <filesystem>
#include <iomanip>
#include <iostream>
#include <limits>
#include <random>
#include <string>
#include <string_view>
#include <system_error>
#include <type_traits>
#include <vector>
#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_checkpoint_phase17_example.cc:

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Detailed Description

Phase 17 showcase: compression, async writer and delta snapshots for ca-checkpoint.H.

Three independent demos (selectable via the first CLI argument):

  • compress — saves the same engine state both raw and DEFLATE-compressed; reports the on-disk size and the compression ratio.
  • async — measures the per-step wall time of a long run with and without an Async_Checkpoint_Writer plumbed into a Periodic_Checkpoint_Observer, and prints the relative overhead.
  • delta — captures a baseline snapshot, advances the engine, stores a save_delta_checkpoint, reloads the baseline into a fresh engine and applies the delta on top. Verifies cell-by-cell that the reconstructed state matches the live engine.
  • all — runs all three back-to-back (default).

Run: ./ca_checkpoint_phase17_example [mode] [side] [steps]

Defaults: mode=all, side=128, steps=200.

Definition in file ca_checkpoint_phase17_example.cc.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)