tests/benchmarks/bench_all.cpp
// run 10 iterations on multiple grid sizes using the default number of workers
run 10 iterations on multiple grid sizes using the default number of workers
run 10 iterations on multiple grid sizes using the default number of workers
static void BM_SimulationStepSequential(benchmark::State &state)
{
    size_t nrows = state.range(0);
    size_t ncols = nrows;
    auto nsteps = 10;
    auto grid = ca::Grid<int>(nrows, ncols);
    auto update_fn = conways_game_of_life_update_function<int>;
    auto cellaut = ca::seq::CellularAutomaton<int>(grid, update_fn);
    for (auto _ : state)
    {
        cellaut.simulate(nsteps);
    }
}
static void BM_SimulationStepSequential ( benchmark :: State & state ) { size_t nrows = state . range ( 0 ) ; size_t ncols = nrows ; auto nsteps = 10 ; auto grid = ca :: Grid < int > ( nrows , ncols ) ; auto update_fn = conways_game_of_life_update_function < int > ; auto cellaut = ca :: seq :: CellularAutomaton < int > ( grid , update_fn ) ; for ( auto _ : state ) { cellaut . simulate ( nsteps ) ; } }
run 10 iterations on multiple grid sizes using the default number of workers
run 10 iterations on multiple grid sizes using the default number of workers