|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Phase-5 illustration: a glider gun on a parallel GoL engine. More...
#include <cstdio>#include <cstdlib>#include <ca-engine-utils.H>#include <tpl_ca_engine.H>#include <tpl_ca_lattice.H>#include <tpl_ca_neighborhood.H>#include <tpl_ca_parallel_engine.H>#include <tpl_ca_rule.H>#include <tpl_ca_storage.H>Go to the source code of this file.
Typedefs | |
| using | Lat_t = Lattice< Dense_Cell_Storage< int, 2 >, ToroidalBoundary > |
Functions | |
| int | main () |
Phase-5 illustration: a glider gun on a parallel GoL engine.
Sets up a 60×80 toroidal Game of Life with Gosper's glider gun and runs it for several hundred steps using the parallel engine. Every 30 steps it prints an ASCII snapshot of the grid plus the live cell count; this makes the per-step progress visible and shows how a canonical pattern evolves under the same multithreaded engine that powers larger HPC simulations.
The example is also a smoke test: at the end it asserts that the parallel and sequential engines have produced bit-identical frames.
Definition in file ca_parallel_gol_example.cc.
| using Lat_t = Lattice<Dense_Cell_Storage<int, 2>, ToroidalBoundary> |
Definition at line 60 of file ca_parallel_gol_example.cc.
| int main | ( | void | ) |
Definition at line 116 of file ca_parallel_gol_example.cc.
References Aleph::blossom_maximum_cardinality_matching(), cols, Aleph::CA::frames_equal(), Aleph::CA::make_game_of_life_rule(), Aleph::CA::Parallel_Engine_Config::num_partitions, rows, Aleph::CA::Synchronous_Engine< Lattice, Rule, Neighborhood, Order >::run(), seed, and steps.