Counter that uses PAPI to measure both time and different events. More...
Classes | |
struct | raw_value_type |
Counter return type that stores time and requested counters. More... | |
Public Member Functions | |
template<typename... Args> | |
papi_timer_n_counter (Args &&... events) | |
Creates a new papi_timer_n_counter with the requested PAPI events. | |
papi_timer_n_counter (std::initializer_list< int > events) | |
Creates a new papi_timer_n_counter with the requested PAPI events. | |
raw_value_type | read (void) const |
Returns the raw value from the counter. | |
void | start (void) |
Starts the counter. | |
value_type | stop (void) |
Stops the counter and returns the difference from start(). | |
Static Public Member Functions | |
static constexpr const char * | name (void) noexcept |
Returns the name of the counter as a C string. | |
static value_type | normalize (raw_value_type v) noexcept |
Normalizes the given raw value. | |
Public Types | |
typedef raw_value_type | value_type |
Counter that uses PAPI to measure both time and different events.
This counter provides support for measuring various events using PAPI. The number and type of events is only limited by the hardware support.
The events are identified by their PAPI name passed at the constructor of the counter.
PAPI event names can be found using the papi_avail
utility.