Namespace bench¶
Classes¶
| Type | Name |
|---|---|
| struct | Timing |
Public Functions¶
| Type | Name |
|---|---|
| double | cpu_ms (std::clock_t t0, std::clock_t t1) |
| void | hash_ints (uint64_t & h, const std::vector< int > & x) |
| uint64_t | run_checksum (epiworld::Model<> & m) |
| Timing | time_runs (epiworld::Model<> & model, int days, int reps, const std::vector< size_t > & uninfected_states={0u}, const std::function< void() > & after_warmup=nullptr) |
Public Functions Documentation¶
function cpu_ms¶
CPU milliseconds between two std::clock() readings.
function hash_ints¶
FNV-1a over a stream of integers.
function run_checksum¶
Hash of the daily counts and the transmissions of the last run.
function time_runs¶
inline Timing bench::time_runs (
epiworld::Model<> & model,
int days,
int reps,
const std::vector< size_t > & uninfected_states={0u},
const std::function< void () > & after_warmup=nullptr
)
Runs model once to warm it up (seed 999), then times reps runs of days days (seeds 1000, 1001, ...).
Parameters:
uninfected_statesStates of agents that were never infected (e.g., susceptible and quarantined-susceptible); the final size is the number of agents outside them.after_warmupCalled once after the warm-up run, e.g., to reset a counter the model's callbacks keep.
The documentation for this class was generated from the following file include/bench/bench.hpp