#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 KernelProfilingCounter & | GetCounter (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 () |
Class which holds profiling information about a kernel run under specific configuration.
|
default |
Constructor which creates empty invalid profiling data.
|
explicit |
Constructor which creates invalid profiling data and initializes number of remaining kernel runs needed to gather valid profiling counters.
| remainingRuns | Number of remaining kernel runs needed to gather valid profiling counters. |
|
explicit |
Constructor which creates valid profiling data and fills the structure with provided profiling counters.
| counters | Vector of profiling counters. |
| void ktt::KernelProfilingData::AddCounter | ( | const KernelProfilingCounter & | counter | ) |
Adds new profiling counter to the vector of existing profiling counters.
| counter | Counter which will be added to the vector of existing profiling counters. |
| void ktt::KernelProfilingData::DecreaseRemainingProfilingRuns | ( | ) |
Decreases number of remaining kernel runs needed to gather valid profiling counters. Performs no operation if profiling data is valid.
| 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.
| name | Name of a profiling counter which will be retrieved. |
| const std::vector< KernelProfilingCounter > & ktt::KernelProfilingData::GetCounters | ( | ) | const |
Retrieves vector of all profiling counters.
| 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.
| bool ktt::KernelProfilingData::HasCounter | ( | const std::string & | name | ) | const |
Checks whether profiling counter with specified name exists.
| name | Name of a profiling counter whose existence will be checked. |
| bool ktt::KernelProfilingData::HasRemainingProfilingRuns | ( | ) | const |
Checks whether there are more kernel runs needed to gather valid profiling counters.
| bool ktt::KernelProfilingData::IsValid | ( | ) | const |
Checks whether the profiling information is valid.
| void ktt::KernelProfilingData::SetCounters | ( | const std::vector< KernelProfilingCounter > & | counters | ) |
Fills the structure with provided profiling counters. Sets number of remaining kernel runs to zero.
| counters | Vector of profiling counters. |