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

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

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 

Detailed Description

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.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)