cl::sycl::codeplay::profiling::profiling_zone Class Reference
RAII object used to create user defined profiling zones. More...
#include <profiling_user.h>
Public Member Functions | |
COMPUTECPP_EXPORT | profiling_zone (const char *name) |
Starts a new user-defined zone. More... | |
COMPUTECPP_EXPORT | ~profiling_zone () |
Closes a user-defined zone. More... | |
Detailed Description
RAII object used to create user defined profiling zones.
User zones are displayed in the profilers together with API calls. This allows the user to add annotations to the source code
Suppose there is a function of interest that should be displayed in the profiler:
void function() { cl::sycl::codeplay::profiling::profiling_zone Zone{"My Function"}; // Some heavy workload}
This will show "My Function" as an API call in the profiler. Zones can be nested, which allows complex call chains to be displayed in the profiler.
Definition at line 32 of file profiling_user.h.
Constructor & Destructor Documentation
◆ profiling_zone()
|
explicit |
Starts a new user-defined zone.
- Parameters
-
name The name of zone
◆ ~profiling_zone()
COMPUTECPP_EXPORT cl::sycl::codeplay::profiling::profiling_zone::~profiling_zone | ( | ) |
Closes a user-defined zone.
The documentation for this class was generated from the following file: