42 constexpr std::int64_t soup_side = 256;
43 constexpr unsigned advance_log2 = 20;
44 constexpr std::uint64_t soup_seed = 0xB7EED50FCA000001ull;
45 const double generations =
static_cast<double>(std::uint64_t{1} << advance_log2);
50 std::mt19937_64
rng(soup_seed);
51 std::bernoulli_distribution alive(0.5);
52 for (std::int64_t
y = 0;
y < soup_side; ++
y)
53 for (std::int64_t x = 0; x < soup_side; ++x)
56 engine.advance(advance_log2);
Shared harness for the cellular-automata performance-gate anchors.
Hashlife engine for outer-totalistic binary cellular automata.
std::size_t resolve_repeats(const std::size_t fallback)
Resolve the number of timed repetitions for one anchor.
void emit_json(const Bench_Result &result, std::ostream &out=std::cout)
Print one benchmark result as a single structured JSON object.
Bench_Result measure(std::string name, const double processed_cells, std::size_t repeats, Work &&work)
Time a kernel with one warmup pass plus a median of timed passes.
Outcome of one measured anchor benchmark.
Hashlife engine for outer-totalistic binary cellular automata.