Class CUDAEventTimer¶
Defined in File CUDAEventTimer.cuh
Inheritance Relationships¶
Base Type¶
public flamegpu::detail::Timer
(Class Timer)
Class Documentation¶
-
class CUDAEventTimer : public virtual flamegpu::detail::Timer¶
Class to simplify the use of CUDAEvents for timing. Timing between CUDAEvent_t is only accurate in the default stream, hence streams cannot be passed.
Public Functions
-
inline CUDAEventTimer()¶
Default constructor, creates the cudaEvents and initialises values.
-
inline ~CUDAEventTimer()¶
Destroys the cudaEvents created by this instance
-
inline virtual void start() override¶
Record the start event, resetting the syncronisation flag.
-
inline virtual void stop() override¶
Record the stop event, resetting the syncronisation flag.
-
inline virtual float getElapsedMilliseconds() override¶
Get the elapsed time between the start event being issued and the stop event occuring.
- Returns:
elapsed time in milliseconds
-
inline virtual float getElapsedSeconds() override¶
Get the elapsed time between the start event being issued and the stop event occuring.
- Returns:
elapsed time in seconds
-
inline CUDAEventTimer()¶