gpufilter
GPU-Efficient Recursive Filtering and Summed-Area Tables
|
Base timer class. More...
#include <timer.h>
Public Member Functions | |
base_timer (const char *type_label, size_t data_size=0, const std::string &unit="") | |
void | start () |
Start counting timing. | |
void | stop () |
Stop counting timing. | |
float | elapsed () |
Time elapsed. | |
bool | is_stopped () const |
Check if this timer is not counting timing. | |
size_t | data_size () const |
Data size associated with this timer. | |
const std::string & | unit () const |
Unit of the data associated with this timer. | |
const char * | type_label () |
Type of this timer. | |
Protected Member Functions | |
virtual void | do_start ()=0 |
Do start this timer. | |
virtual void | do_stop ()=0 |
Do stop this timer. | |
virtual float | do_get_elapsed () const =0 |
Do get time elapsed by this timer. | |
Private Member Functions | |
base_timer (const base_timer &bt) | |
Prevent the assignment declaration by derived classes. | |
base_timer & | operator= (const base_timer &bt) |
Assign operator (deleted) | |
Private Attributes | |
const char * | m_type_label |
Label for this timer type. | |
float | m_elapsed |
Elapsed time. | |
bool | m_started |
Flag true if this timer is counting timing. | |
size_t | m_data_size |
Data size associated with this timer. | |
std::string | m_unit |
Unit of the associated data. |
Base timer class.
Base timer is the abstract class for timing computation.
gpufilter::base_timer::base_timer | ( | const char * | type_label, |
size_t | data_size = 0 , |
||
const std::string & | unit = "" |
||
) |
Constructor
[in] | type_label | The label string for this timer type |
[in] | data_size | Data size associated with this timer |
[in] | unit | The unit of the associated data |
gpufilter::base_timer::base_timer | ( | const base_timer & | bt | ) | [private] |
Prevent the assignment declaration by derived classes.
Copy Constructor (deleted)
[in] | bt | Object to copy to this object |
size_t gpufilter::base_timer::data_size | ( | ) | const [inline] |
Data size associated with this timer.
virtual float gpufilter::base_timer::do_get_elapsed | ( | ) | const [protected, pure virtual] |
Do get time elapsed by this timer.
Implemented in gpufilter::cpu_timer, and gpufilter::gpu_timer.
float gpufilter::base_timer::elapsed | ( | ) |
Time elapsed.
bool gpufilter::base_timer::is_stopped | ( | ) | const [inline] |
Check if this timer is not counting timing.
base_timer& gpufilter::base_timer::operator= | ( | const base_timer & | bt | ) | [private] |
Assign operator (deleted)
Prevent the assignment declaration by derived classes
[in] | bt | Object to copy from |
const char* gpufilter::base_timer::type_label | ( | ) | [inline] |
Type of this timer.
const std::string& gpufilter::base_timer::unit | ( | ) | const [inline] |
Unit of the data associated with this timer.