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

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

Go to the source code of this file.

Typedefs

using Lat_t = Lattice< Dense_Cell_Storage< int, 2 >, ToroidalBoundary >
 

Functions

int main ()
 

Detailed Description

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.

Typedef Documentation

◆ Lat_t

Definition at line 60 of file ca_parallel_gol_example.cc.

Function Documentation

◆ main()