Counter that uses PAPI to measure different events. More...
Public Member Functions | |
template<typename... Args> | |
papi_counter (int first, Args &&... events) | |
Creates a new papi_counter with the requested PAPI events. | |
papi_counter (std::initializer_list< int > l) | |
Creates a new papi_counter with the requested PAPI events in the std::initializer_list . | |
papi_counter (std::vector< int > const &v) | |
Creates a new papi_counter with the requested PAPI events in the std::vector . | |
papi_counter (papi_counter const &)=delete | |
papi_counter & | operator= (papi_counter const &)=delete |
raw_value_type | read (void) const |
Returns the raw value from the counter. | |
void | start (void) noexcept |
Starts the counter. | |
value_type | stop (void) |
Stops the counter and returns the difference from start(). More... | |
Static Public Member Functions | |
static constexpr const char * | name (void) noexcept |
Returns the name of the counter as a C string. | |
static constexpr value_type const & | normalize (raw_value_type const &v) noexcept |
Normalizes the given raw value. | |
Public Types | |
typedef std::vector< long_long > | raw_value_type |
typedef std::vector< long_long > | value_type |
Counter that uses PAPI to measure 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.
value_type stapl::papi_counter::stop | ( | void | ) |