|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
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>Go to the source code of this file.
Typedefs | |
| using | Lat_t = Lattice< Dense_Cell_Storage< int, 2 >, ToroidalBoundary > |
Functions | |
| int | main () |
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.
| using Lat_t = Lattice<Dense_Cell_Storage<int, 2>, ToroidalBoundary> |
Definition at line 66 of file ca_bench_example.cc.
| int main | ( | void | ) |
Definition at line 121 of file ca_bench_example.cc.
References Aleph::CA::bench_seconds(), Aleph::blossom_maximum_cardinality_matching(), Aleph::default_pool(), Aleph::CA::format_throughput(), Aleph::CA::frames_equal(), Aleph::CA::make_game_of_life_rule(), N, seed, and steps.