|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Microbench: GoL 1024x1024 on Lattice (Phase 3) vs Ghost_Lattice (Phase 4).
More...
#include <array>#include <cassert>#include <chrono>#include <cerrno>#include <cstdint>#include <cstdlib>#include <iomanip>#include <iostream>#include <limits>#include <utility>#include <ca-traits.H>#include <tpl_ca_storage.H>#include <tpl_ca_lattice.H>#include <tpl_ca_ghost_lattice.H>#include <tpl_ca_neighborhood.H>#include <tpl_ca_rule.H>#include <tpl_ca_engine.H>Go to the source code of this file.
Functions | |
| int | main (int argc, char *argv[]) |
Microbench: GoL 1024x1024 on Lattice (Phase 3) vs Ghost_Lattice (Phase 4).
Runs Conway's Game of Life on a 1024 x 1024 toroidal grid for a fixed number of steps using the two lattice flavours defined by the CA module, and prints the wall-clock time and steps-per-second for each. Phase 4 targets a >= 30% speedup over Phase 3 — this example is the reproducible rig to measure it.
Usage: ./build/Examples/ca_ghost_bench_example [size] [steps]
Defaults: size = 1024, steps = 50.
The bench stamps a deterministic pseudo-random seed so both engines start from the exact same state. After the runs it also asserts that both engines produce the same final frame, which doubles as a correctness smoke test.
Definition in file ca_ghost_bench_example.cc.
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 164 of file ca_ghost_bench_example.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::make_game_of_life_rule(), Aleph::size(), and steps.