This file is the main include file for the ComPPare framework.
More...
Go to the source code of this file.
|
namespace | comppare |
| ComPPare framework main namespace.
|
|
|
concept | comppare::OutSpec |
| Concept for output specifications being pair of type and policy.
|
|
|
#define | HOTLOOPSTART auto &&hotloop_body = [&]() { /* start of lambda */ |
| Macro to mark the start of a hot loop for benchmarking. This macro defines a lambda function hotloop_body that encapsulates the code to be benchmarked.
|
|
#define | COMPPARE_HOTLOOP_BENCH |
| Internal macro to perform the warm-up and timed benchmarking loops. This macro is used within the HOTLOOPEND macro to execute the benchmarking process.
|
|
#define | HOTLOOPEND |
|
#define | HOTLOOP(LOOP_BODY) HOTLOOPSTART LOOP_BODY HOTLOOPEND |
| Macro to wrap a code block for benchmarking.
|
|
#define | MANUAL_TIMER_START auto t_manual_start = comppare::config::clock_t::now(); |
| Macro to mark the start of a manual timer for benchmarking.
|
|
#define | MANUAL_TIMER_END |
| Macro to mark the end of a manual timer for benchmarking.
|
|
#define | SET_ITERATION_TIME(TIME) comppare::config::increment_roi_us(TIME); |
|
|
template<typename Value , typename Policy > |
using | comppare::set_policy = outspec< Value, Policy > |
| Alias for setting the error policy for a type.
|
|
This file is the main include file for the ComPPare framework.
- Author
- Leong Fan FUNG (funglf) stanl.nosp@m.eyfu.nosp@m.nglf@.nosp@m.gmai.nosp@m.l.com
- Date
- 2025
- Copyright
- MIT License
- See also
- LICENSE For full license text.
◆ COMPPARE_HOTLOOP_BENCH
#define COMPPARE_HOTLOOP_BENCH |
Value: \
auto warmup_t0 = comppare::config::clock_t::now(); \
hotloop_body(); \
auto warmup_t1 = comppare::config::clock_t::now(); \
comppare::config::set_warmup_us(warmup_t0, warmup_t1); \
\
\
comppare::config::reset_roi_us(); \
auto t0 = comppare::config::clock_t::now(); \
hotloop_body(); \
auto t1 = comppare::config::clock_t::now(); \
\
comppare::config::set_roi_us(t0, t1);
static double get_roi_us()
Get the current roi us value.
Definition config.hpp:163
static uint64_t bench_iters()
Get the number of benchmark iterations.
Definition config.hpp:71
static uint64_t warmup_iters()
Get the number of warmup iterations.
Definition config.hpp:66
Internal macro to perform the warm-up and timed benchmarking loops. This macro is used within the HOTLOOPEND
macro to execute the benchmarking process.
◆ HOTLOOP
Macro to wrap a code block for benchmarking.
◆ HOTLOOPEND
Value: } \
; \
\
#define COMPPARE_HOTLOOP_BENCH
Internal macro to perform the warm-up and timed benchmarking loops. This macro is used within the HOT...
Definition comppare.hpp:971
◆ HOTLOOPSTART
#define HOTLOOPSTART auto &&hotloop_body = [&]() { /* start of lambda */ |
Macro to mark the start of a hot loop for benchmarking. This macro defines a lambda function hotloop_body
that encapsulates the code to be benchmarked.
◆ MANUAL_TIMER_END
Value: auto t_manual_stop = comppare::config::clock_t::now(); \
SET_ITERATION_TIME(t_manual_stop - t_manual_start);
Macro to mark the end of a manual timer for benchmarking.
◆ MANUAL_TIMER_START
#define MANUAL_TIMER_START auto t_manual_start = comppare::config::clock_t::now(); |
Macro to mark the start of a manual timer for benchmarking.
◆ SET_ITERATION_TIME