ComPPare 1.0.0
|
Configuration singleton for the ComPPare library. More...
#include <config.hpp>
Public Types | |
using | clock_t = std::chrono::steady_clock |
Type alias for the clock used in timing operations. | |
using | time_point_t = std::chrono::time_point< clock_t > |
Type alias for the time point used in timing operations. | |
Public Member Functions | |
config (const config &)=delete | |
Deleted copy constructor. | |
config (config &&)=delete | |
Deleted move constructor. | |
config & | operator= (const config &)=delete |
Deleted copy assignment operator. | |
config & | operator= (config &&)=delete |
Deleted move assignment operator. | |
Static Public Member Functions | |
static uint64_t | warmup_iters () |
Get the number of warmup iterations. | |
static void | set_warmup_iters (uint64_t v) |
Set the number of warmup iterations. | |
static uint64_t | bench_iters () |
Get the number of benchmark iterations. | |
static void | set_bench_iters (uint64_t v) |
Set the number of benchmark iterations. | |
static void | reset_roi_us () |
Reset the ROI time to zero. | |
static void | set_roi_us (const time_point_t &start, const time_point_t &end) |
Set the roi us value using time points. | |
static void | set_roi_us (const float start, const float end) |
Set the roi us value using float. | |
static void | set_roi_us (const double start, const double end) |
Set the roi us value using double. | |
template<typename Rep , typename Period > | |
static void | set_roi_us (std::chrono::duration< Rep, Period > v) |
Set the roi us value using a std::chrono::duration . | |
static void | set_roi_us (const double v) |
Set the roi us value using double. | |
static void | set_roi_us (const float v) |
Set the roi us value using float. | |
template<typename Rep , typename Period > | |
static void | increment_roi_us (std::chrono::duration< Rep, Period > v) |
Increment the roi us value using time points. | |
static void | increment_roi_us (const double v) |
Increment the roi us value using double. | |
static void | increment_roi_us (const float v) |
Increment the roi us value using float. | |
static void | set_warmup_us (const time_point_t &start, const time_point_t &end) |
Set the warmup us value using time points. | |
static void | set_warmup_us (const float start, const float end) |
Set the warmup us value using float. | |
static void | set_warmup_us (const double start, const double end) |
Set the warmup us value using double. | |
template<typename Rep , typename Period > | |
static void | set_warmup_us (std::chrono::duration< Rep, Period > v) |
Set the warmup us value using a std::chrono::duration . | |
static void | set_warmup_us (const double v) |
Set the warmup us value using double. | |
static void | set_warmup_us (const float v) |
Set the warmup us value using float. | |
static double | get_roi_us () |
Get the current roi us value. | |
static double | get_warmup_us () |
Get the current warmup us value. | |
template<std::floating_point T = double> | |
static T & | fp_tolerance () |
Get the floating-point tolerance for a specific floating-point type. | |
template<std::floating_point T = double> | |
static void | set_fp_tolerance (T v) |
Set the floating-point tolerance for a specific floating-point type. | |
static void | set_all_fp_tolerance (long double v) |
Set the floating-point tolerance for all supported types. | |
Private Member Functions | |
config ()=default | |
Construct a new config object. | |
Static Private Member Functions | |
static config & | instance () |
Get the singleton instance of the config class. | |
Private Attributes | |
double | roi_ {0.0} |
The current roi us value. | |
double | warmup_ {0.0} |
The current warmup us value. | |
uint64_t | warmup_iters_ {100} |
The number of warmup iterations. | |
uint64_t | bench_iters_ {100} |
The number of benchmark iterations. | |
Configuration singleton for the ComPPare library.
using comppare::config::clock_t = std::chrono::steady_clock |
Type alias for the clock used in timing operations.
using comppare::config::time_point_t = std::chrono::time_point<clock_t> |
Type alias for the time point used in timing operations.
|
delete |
Deleted copy constructor.
|
delete |
Deleted move constructor.
|
privatedefault |
Construct a new config object.
|
inlinestatic |
Get the number of benchmark iterations.
|
inlinestatic |
Get the floating-point tolerance for a specific floating-point type.
T |
|
inlinestatic |
Get the current roi us value.
|
inlinestatic |
Get the current warmup us value.
|
inlinestatic |
Increment the roi us value using double.
|
inlinestatic |
Increment the roi us value using float.
|
inlinestatic |
Increment the roi us value using time points.
start | |
end |
|
inlinestaticprivate |
Get the singleton instance of the config class.
|
inlinestatic |
Reset the ROI time to zero.
|
inlinestatic |
Set the floating-point tolerance for all supported types.
v | The tolerance value to set for all floating-point types. |
|
inlinestatic |
Set the number of benchmark iterations.
|
inlinestatic |
Set the floating-point tolerance for a specific floating-point type.
T |
v | The tolerance value to set. |
|
inlinestatic |
Set the roi us value using double.
|
inlinestatic |
Set the roi us value using double.
|
inlinestatic |
Set the roi us value using float.
|
inlinestatic |
Set the roi us value using float.
|
inlinestatic |
Set the roi us value using time points.
start | |
end |
|
inlinestatic |
Set the roi us value using a std::chrono::duration
.
Rep | |
Period |
v |
|
inlinestatic |
Set the number of warmup iterations.
|
inlinestatic |
Set the warmup us value using double.
start | |
end |
|
inlinestatic |
Set the warmup us value using double.
|
inlinestatic |
Set the warmup us value using float.
start | |
end |
|
inlinestatic |
Set the warmup us value using float.
|
inlinestatic |
Set the warmup us value using time points.
start | |
end |
|
inlinestatic |
Set the warmup us value using a std::chrono::duration
.
Rep | |
Period |
v |
|
inlinestatic |
Get the number of warmup iterations.
|
private |
The number of benchmark iterations.
|
private |
The current roi us value.
|
private |
The current warmup us value.
|
private |
The number of warmup iterations.