Gromacs  2024.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Typedefs
gpuregiontimer_ocl.h File Reference
#include <array>
#include "gromacs/gpu_utils/gputraits_ocl.h"
#include "gromacs/gpu_utils/oclutils.h"
#include "gromacs/utility/stringutil.h"
#include "gpuregiontimer.h"
+ Include dependency graph for gpuregiontimer_ocl.h:

Description

Implements the GPU region timer for OpenCL.

Author
Aleksei Iupinov a.yup.nosp@m.inov.nosp@m.@gmai.nosp@m.l.co.nosp@m.m

Classes

class  GpuRegionTimerImpl
 The OpenCL implementation of the GPU code region timing. With OpenCL, one has to use cl_event handle for each API call that has to be timed, and accumulate the timing afterwards. As we would like to avoid overhead on API calls, we only query and accumulate cl_event timing at the end of time steps, not after the API calls. Thus, this implementation does not reuse a single cl_event for multiple calls, but instead maintains an array of cl_events to be used within any single code region. The array size is fixed at a small but sufficiently large value for the number of cl_events that might contribute to a timer region, currently 10. More...
 

Typedefs

using GpuRegionTimer = GpuRegionTimerWrapper< GpuRegionTimerImpl >
 Short-hand for external use.