A timer to measure time and time intervals on GPU. More...
#include <GPUTimer.h>
Public Member Functions | |
GPUTimer () | |
Creates a new GPUTimer. | |
virtual | ~GPUTimer () |
Destroys this timer. | |
virtual double | start () |
Starts this timer and returns the current time in micro seconds. | |
virtual double | end () |
Returns the delay since the last call to start() in micro seconds. | |
virtual double | getTime () |
See Timer::getTime(). | |
virtual double | getAvgTime () |
See Timer::getAvgTime(). | |
Protected Member Functions | |
void | getQueryResult () |
Returns the result of the query query. | |
Protected Attributes | |
unsigned int | query |
GPU query used to measure time on GPU. |
A timer to measure time and time intervals on GPU.
Since GPU computations are asynchroneous, we can't just use CPU time to check the duration of an operation.
ork::GPUTimer::GPUTimer | ( | ) |
Creates a new GPUTimer.
virtual ork::GPUTimer::~GPUTimer | ( | ) | [virtual] |
Destroys this timer.
virtual double ork::GPUTimer::end | ( | ) | [virtual] |
Returns the delay since the last call to start() in micro seconds.
Reimplemented from ork::Timer.
virtual double ork::GPUTimer::getAvgTime | ( | ) | [virtual] |
See Timer::getAvgTime().
Reimplemented from ork::Timer.
void ork::GPUTimer::getQueryResult | ( | ) | [protected] |
Returns the result of the query query.
virtual double ork::GPUTimer::getTime | ( | ) | [virtual] |
See Timer::getTime().
Reimplemented from ork::Timer.
virtual double ork::GPUTimer::start | ( | ) | [virtual] |
Starts this timer and returns the current time in micro seconds.
Reimplemented from ork::Timer.
unsigned int ork::GPUTimer::query [protected] |
GPU query used to measure time on GPU.