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

#include <KernelProfilingData.h>

Public Member Functions

 KernelProfilingData ()=default
 
 KernelProfilingData (const uint64_t remainingRuns)
 
 KernelProfilingData (const std::vector< KernelProfilingCounter > &counters)
 
bool IsValid () const
 
bool HasCounter (const std::string &name) const
 
const KernelProfilingCounterGetCounter (const std::string &name) const
 
const std::vector< KernelProfilingCounter > & GetCounters () const
 
void SetCounters (const std::vector< KernelProfilingCounter > &counters)
 
void AddCounter (const KernelProfilingCounter &counter)
 
bool HasRemainingProfilingRuns () const
 
uint64_t GetRemainingProfilingRuns () const
 
void DecreaseRemainingProfilingRuns ()
 

Detailed Description

Class which holds profiling information about a kernel run under specific configuration.

Constructor & Destructor Documentation

◆ KernelProfilingData() [1/3]

ktt::KernelProfilingData::KernelProfilingData ( )
default

Constructor which creates empty invalid profiling data.

◆ KernelProfilingData() [2/3]

ktt::KernelProfilingData::KernelProfilingData ( const uint64_t  remainingRuns)
explicit

Constructor which creates invalid profiling data and initializes number of remaining kernel runs needed to gather valid profiling counters.

Parameters
remainingRunsNumber of remaining kernel runs needed to gather valid profiling counters.

◆ KernelProfilingData() [3/3]

ktt::KernelProfilingData::KernelProfilingData ( const std::vector< KernelProfilingCounter > &  counters)
explicit

Constructor which creates valid profiling data and fills the structure with provided profiling counters.

Parameters
countersVector of profiling counters.

Member Function Documentation

◆ AddCounter()

void ktt::KernelProfilingData::AddCounter ( const KernelProfilingCounter counter)

Adds new profiling counter to the vector of existing profiling counters.

Parameters
counterCounter which will be added to the vector of existing profiling counters.

◆ DecreaseRemainingProfilingRuns()

void ktt::KernelProfilingData::DecreaseRemainingProfilingRuns ( )

Decreases number of remaining kernel runs needed to gather valid profiling counters. Performs no operation if profiling data is valid.

◆ GetCounter()

const KernelProfilingCounter & ktt::KernelProfilingData::GetCounter ( const std::string &  name) const

Retrieves profiling counter with specified name. Throws an exception if no corresponding counter is found.

Parameters
nameName of a profiling counter which will be retrieved.
Returns
Profiling counter with specified name. See KernelProfilingCounter for more information.

◆ GetCounters()

const std::vector< KernelProfilingCounter > & ktt::KernelProfilingData::GetCounters ( ) const

Retrieves vector of all profiling counters.

Returns
Vector of all profiling counters. See KernelProfilingCounter for more information.

◆ GetRemainingProfilingRuns()

uint64_t ktt::KernelProfilingData::GetRemainingProfilingRuns ( ) const

Retrieves number of remaining kernel runs needed to gather valid profiling counters. Note that this method currently returns incorrect information when using new CUPTI profiling API.

Returns
Number of remaining kernel runs needed to gather valid profiling counters.

◆ HasCounter()

bool ktt::KernelProfilingData::HasCounter ( const std::string &  name) const

Checks whether profiling counter with specified name exists.

Parameters
nameName of a profiling counter whose existence will be checked.

◆ HasRemainingProfilingRuns()

bool ktt::KernelProfilingData::HasRemainingProfilingRuns ( ) const

Checks whether there are more kernel runs needed to gather valid profiling counters.

Returns
Information whether there are more kernel runs needed to gather valid profiling counters.

◆ IsValid()

bool ktt::KernelProfilingData::IsValid ( ) const

Checks whether the profiling information is valid.

Returns
True if profiling information is valid. False otherwise.

◆ SetCounters()

void ktt::KernelProfilingData::SetCounters ( const std::vector< KernelProfilingCounter > &  counters)

Fills the structure with provided profiling counters. Sets number of remaining kernel runs to zero.

Parameters
countersVector of profiling counters.

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