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

Phase-5 microbenchmark: parallel vs sequential GoL throughput. More...

#include <array>
#include <cstdint>
#include <cstdio>
#include <random>
#include <vector>
#include <thread_pool.H>
#include <ca-bench.H>
#include <ca-traits.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_bench_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 microbenchmark: parallel vs sequential GoL throughput.

Sweeps a grid of (N, threads) configurations, runs Conway's Game of Life with toroidal borders for a fixed number of steps, and prints a table with wall-clock time, throughput and the speedup vs the single-thread baseline.

The example asserts that the parallel and sequential engines produce bit-identical final frames for every configuration. This doubles as a sanity check: any divergence is a bug to fix before looking at the timings.

Definition in file ca_bench_example.cc.

Typedef Documentation

◆ Lat_t

Definition at line 66 of file ca_bench_example.cc.

Function Documentation

◆ main()