#include <benchpress.hpp>
Public Member Functions | |
context (const benchmark_info &info, const options &opts) | |
size_t | get_ns_per_op () |
size_t | num_iterations () const |
size_t | num_threads () const |
void | reset_timer () |
result | run () |
void | run_n (size_t n) |
void | run_parallel (std::function< void(parallel_context *)> f) |
void | set_bytes (int64_t bytes) |
void | set_num_threads (size_t n) |
void | start_timer () |
void | stop_timer () |
Private Member Functions | |
template<typename T > | |
T | round_down_10 (T n) |
template<typename T > | |
T | round_up (T n) |
Private Attributes | |
benchmark_info | d_benchmark |
std::chrono::seconds | d_benchtime |
std::chrono::nanoseconds | d_duration |
size_t | d_num_bytes |
size_t | d_num_iterations |
size_t | d_num_threads |
std::chrono::high_resolution_clock::time_point | d_start |
bool | d_timer_on |
Definition at line 215 of file benchpress.hpp.
benchpress::context::context | ( | const benchmark_info & | info, |
const options & | opts | ||
) | [inline] |
Definition at line 226 of file benchpress.hpp.
size_t benchpress::context::get_ns_per_op | ( | ) | [inline] |
Definition at line 263 of file benchpress.hpp.
size_t benchpress::context::num_iterations | ( | ) | const [inline] |
Definition at line 237 of file benchpress.hpp.
size_t benchpress::context::num_threads | ( | ) | const [inline] |
Definition at line 240 of file benchpress.hpp.
void benchpress::context::reset_timer | ( | ) | [inline] |
Definition at line 254 of file benchpress.hpp.
T benchpress::context::round_down_10 | ( | T | n | ) | [inline, private] |
Definition at line 310 of file benchpress.hpp.
T benchpress::context::round_up | ( | T | n | ) | [inline, private] |
Definition at line 324 of file benchpress.hpp.
result benchpress::context::run | ( | ) | [inline] |
Definition at line 291 of file benchpress.hpp.
void benchpress::context::run_n | ( | size_t | n | ) | [inline] |
Definition at line 270 of file benchpress.hpp.
void benchpress::context::run_parallel | ( | std::function< void(parallel_context *)> | f | ) | [inline] |
Definition at line 278 of file benchpress.hpp.
void benchpress::context::set_bytes | ( | int64_t | bytes | ) | [inline] |
Definition at line 261 of file benchpress.hpp.
void benchpress::context::set_num_threads | ( | size_t | n | ) | [inline] |
Definition at line 239 of file benchpress.hpp.
void benchpress::context::start_timer | ( | ) | [inline] |
Definition at line 242 of file benchpress.hpp.
void benchpress::context::stop_timer | ( | ) | [inline] |
Definition at line 248 of file benchpress.hpp.
Definition at line 223 of file benchpress.hpp.
std::chrono::seconds benchpress::context::d_benchtime [private] |
Definition at line 219 of file benchpress.hpp.
std::chrono::nanoseconds benchpress::context::d_duration [private] |
Definition at line 218 of file benchpress.hpp.
size_t benchpress::context::d_num_bytes [private] |
Definition at line 222 of file benchpress.hpp.
size_t benchpress::context::d_num_iterations [private] |
Definition at line 220 of file benchpress.hpp.
size_t benchpress::context::d_num_threads [private] |
Definition at line 221 of file benchpress.hpp.
std::chrono::high_resolution_clock::time_point benchpress::context::d_start [private] |
Definition at line 217 of file benchpress.hpp.
bool benchpress::context::d_timer_on [private] |
Definition at line 216 of file benchpress.hpp.