NVTX++
3.0
C++ convenience wrappers for NVTX.
|
A RAII object for creating a NVTX range local to a thread within a domain. More...
#include <nvtx3.hpp>
Public Member Functions | |
domain_thread_range (event_attributes const &attr) noexcept | |
Construct a domain_thread_range with the specified event_attributes More... | |
template<typename First , typename... Args, typename = typename std::enable_if<not std::is_same< event_attributes, typename std::decay<First>>::value>> | |
domain_thread_range (First const &first, Args const &...args) noexcept | |
Constructs a domain_thread_range from the constructor arguments of an event_attributes . More... | |
domain_thread_range () | |
Default constructor creates a domain_thread_range with no message, color, payload, nor category. | |
domain_thread_range (domain_thread_range const &)=delete | |
domain_thread_range & | operator= (domain_thread_range const &)=delete |
domain_thread_range (domain_thread_range &&)=delete | |
domain_thread_range & | operator= (domain_thread_range &&)=delete |
~domain_thread_range () noexcept | |
Destroy the domain_thread_range, ending the NVTX range event. | |
A RAII object for creating a NVTX range local to a thread within a domain.
When constructed, begins a nested NVTX range on the calling thread in the specified domain. Upon destruction, ends the NVTX range.
Behavior is undefined if a domain_thread_range
object is created/destroyed on different threads.
domain_thread_range
is neither moveable nor copyable.
domain_thread_range
s may be nested within other ranges.
The domain of the range is specified by the template type parameter D
. By default, the domain::global
is used, which scopes the range to the global NVTX domain. The convenience alias thread_range
is provided for ranges scoped to the global domain.
A custom domain can be defined by creating a type, D
, with a static member D::name
whose value is used to name the domain associated with D
. D::name
must resolve to either char const*
or wchar_t const*
Example:
Usage:
|
inlineexplicitnoexcept |
Construct a domain_thread_range
with the specified event_attributes
Example:
[in] | attr | event_attributes that describes the desired attributes of the range. |
|
inlineexplicitnoexcept |
Constructs a domain_thread_range
from the constructor arguments of an event_attributes
.
Forwards the arguments first, args...
to construct an event_attributes
object. The event_attributes
object is then associated with the domain_thread_range
.
For more detail, see event_attributes
documentation.
Example:
event_attributes
objects, this constructor is disabled when the first argument is an event_attributes
object, instead preferring the explicit domain_thread_range(event_attributes const&)
constructor.[in] | first | First argument to forward to the event_attributes constructor. |
[in] | args | Variadic parameter pack of additional arguments to forward. |