Kernel Tuning Toolkit 2.3
 
Loading...
Searching...
No Matches
ktt::KernelProfilingCounter Class Reference

#include <KernelProfilingCounter.h>

Public Member Functions

 KernelProfilingCounter ()=default
 
 KernelProfilingCounter (const std::string &name, const ProfilingCounterType type, const int64_t value)
 
 KernelProfilingCounter (const std::string &name, const ProfilingCounterType type, const uint64_t value)
 
 KernelProfilingCounter (const std::string &name, const ProfilingCounterType type, const double value)
 
const std::string & GetName () const
 
ProfilingCounterType GetType () const
 
const std::string GetTypeString () const
 
int64_t GetValueInt () const
 
uint64_t GetValueUint () const
 
double GetValueDouble () const
 
bool operator== (const KernelProfilingCounter &other) const
 
bool operator!= (const KernelProfilingCounter &other) const
 
bool operator< (const KernelProfilingCounter &other) const
 

Detailed Description

Class which holds information about single profiling counter.

Constructor & Destructor Documentation

◆ KernelProfilingCounter() [1/4]

ktt::KernelProfilingCounter::KernelProfilingCounter ( )
default

Constructor which creates empty profiling counter.

◆ KernelProfilingCounter() [2/4]

ktt::KernelProfilingCounter::KernelProfilingCounter ( const std::string &  name,
const ProfilingCounterType  type,
const int64_t  value 
)
explicit

Constructor which initializes a profiling counter with specified name, value and type.

Parameters
nameName of a profiling counter.
typeType of a profiling counter. See ProfilingCounterType for more information.
valueInteger value of a profiling counter.

◆ KernelProfilingCounter() [3/4]

ktt::KernelProfilingCounter::KernelProfilingCounter ( const std::string &  name,
const ProfilingCounterType  type,
const uint64_t  value 
)
explicit

Constructor which initializes a profiling counter with specified name, value and type.

Parameters
nameName of a profiling counter.
typeType of a profiling counter. See ProfilingCounterType for more information.
valueUnsigned integer value of a profiling counter.

◆ KernelProfilingCounter() [4/4]

ktt::KernelProfilingCounter::KernelProfilingCounter ( const std::string &  name,
const ProfilingCounterType  type,
const double  value 
)
explicit

Constructor which initializes a profiling counter with specified name, value and type.

Parameters
nameName of a profiling counter.
typeType of a profiling counter. See ProfilingCounterType for more information.
valueDouble value of a profiling counter.

Member Function Documentation

◆ GetName()

const std::string & ktt::KernelProfilingCounter::GetName ( ) const

Getter for name of a profiling counter.

Returns
Name of a profiling counter.

◆ GetType()

ProfilingCounterType ktt::KernelProfilingCounter::GetType ( ) const

Getter for type of a profiling counter. Type of a profiling counter is used to determine which field inside ProfilingCounterValue needs to accessed in order to retrieve a valid value.

Returns
Type of a profiling counter. See ProfilingCounterType for more information.

◆ GetTypeString()

const std::string & ktt::KernelProfilingCounter::GetTypeString ( ) const

Getter for the string with the type of a profiling counter. This string is used is serialization and deserialization of output.

Returns
String with the type of a profiling counter. See ProfilingCounterType for more information.

◆ GetValueDouble()

double ktt::KernelProfilingCounter::GetValueDouble ( ) const

Getter for double value of a profiling counter. Should be used if counter type is Double or Percent.

Returns
Double value of a profiling counter.

◆ GetValueInt()

int64_t ktt::KernelProfilingCounter::GetValueInt ( ) const

Getter for integer value of a profiling counter. Should be used if counter type is Int.

Returns
Integer value of a profiling counter.

◆ GetValueUint()

uint64_t ktt::KernelProfilingCounter::GetValueUint ( ) const

Getter for unsigned integer value of a profiling counter. Should be used if counter type is UnsignedInt, Throughput or UtilizationLevel.

Returns
Unsigned integer value of a profiling counter.

◆ operator!=()

bool ktt::KernelProfilingCounter::operator!= ( const KernelProfilingCounter other) const

Checks whether profiling counter is not equal to other. I.e., counters do not have the same name.

Parameters
otherComparison target.
Returns
True if the counters are not equal. False otherwise.

◆ operator<()

bool ktt::KernelProfilingCounter::operator< ( const KernelProfilingCounter other) const

Checks whether profiling counter is lesser than other. I.e., its name is lesser than other's name.

Parameters
otherComparison target.
Returns
True if the counter is lesser than other. False otherwise.

◆ operator==()

bool ktt::KernelProfilingCounter::operator== ( const KernelProfilingCounter other) const

Checks whether profiling counter is equal to other. I.e., counters have the same name.

Parameters
otherComparison target.
Returns
True if the counters are equal. False otherwise.

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