#include <gromacs/gpu_utils/gpuregiontimer.h>
template<GpuFramework framework>
class GpuRegionTimerWrapper< framework >
This is a GPU region timing wrapper class. It allows for host-side tracking of the accumulated execution timespans in GPU code (measuring kernel or transfers duration). It also partially tracks the correctness of the timer state transitions, as far as current implementation allows (see TODO in getLastRangeTime() for a disabled check). Internally it uses GpuRegionTimerImpl for measuring regions.
|
void | openTimingRegion (CommandStream s) |
| To be called before the region start. More...
|
|
void | closeTimingRegion (CommandStream s) |
| To be called after the region end. More...
|
|
double | getLastRangeTime () |
| Accumulates the last timespan of all the events used into the the total duration, and resets the internal timer state. To be called after closeTimingRegion() and the command stream of the event having been synchronized. More...
|
|
void | reset () |
| Resets the implementation and total time/call count to zeroes.
|
|
double | getTotalTime () const |
| Gets total time recorded (in milliseconds).
|
|
unsigned int | getCallCount () const |
| Gets total call count recorded.
|
|
CommandEvent * | fetchNextEvent () |
| Gets a pointer to a new timing event for passing into individual GPU API calls within the region if they require it (e.g. on OpenCL). More...
|
|
template<GpuFramework framework>
To be called after the region end.
- Parameters
-
[in] | s | The GPU command stream where the event being measured takes place. |
template<GpuFramework framework>
Gets a pointer to a new timing event for passing into individual GPU API calls within the region if they require it (e.g. on OpenCL).
- Returns
- The pointer to the underlying single command timing event.
template<GpuFramework framework>
Accumulates the last timespan of all the events used into the the total duration, and resets the internal timer state. To be called after closeTimingRegion() and the command stream of the event having been synchronized.
- Returns
- The last timespan (in milliseconds).
template<GpuFramework framework>
To be called before the region start.
- Parameters
-
[in] | s | The GPU command stream where the event being measured takes place. |
The documentation for this class was generated from the following file: