Public Member Functions | Private Member Functions | Private Attributes
benchpress::context Class Reference

#include <benchpress.hpp>

List of all members.

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

Detailed Description

Definition at line 215 of file benchpress.hpp.


Constructor & Destructor Documentation

benchpress::context::context ( const benchmark_info info,
const options opts 
) [inline]

Definition at line 226 of file benchpress.hpp.


Member Function Documentation

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.

Definition at line 254 of file benchpress.hpp.

template<typename T >
T benchpress::context::round_down_10 ( T  n) [inline, private]

Definition at line 310 of file benchpress.hpp.

template<typename T >
T benchpress::context::round_up ( T  n) [inline, private]

Definition at line 324 of file benchpress.hpp.

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.

Definition at line 242 of file benchpress.hpp.

Definition at line 248 of file benchpress.hpp.


Member Data Documentation

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.

Definition at line 222 of file benchpress.hpp.

Definition at line 220 of file benchpress.hpp.

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.

Definition at line 216 of file benchpress.hpp.


The documentation for this class was generated from the following file:


rc_visard_driver
Author(s): Heiko Hirschmueller , Christian Emmerich , Felix Ruess
autogenerated on Thu Jun 6 2019 20:43:10