STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Static Public Member Functions | Public Types
stapl::papi_counter Class Reference

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_counteroperator= (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
 

Detailed Description

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.

Member Function Documentation

◆ stop()

value_type stapl::papi_counter::stop ( void  )

Stops the counter and returns the difference from start().

Returns
A std::vector<long_long> with the difference from start().

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