NVTX C++ API Reference 1.0
C++ convenience wrappers for NVTX v3 C API
|
A RAII object for creating a NVTX range local to a thread within a domain. More...
#include <nvtx3.hpp>
Public Member Functions | |
scoped_range_in (event_attributes const &attr) noexcept | |
Construct a scoped_range_in with the specified event_attributes | |
template<typename... Args> | |
scoped_range_in (Args const &... args) noexcept | |
Constructs a scoped_range_in from the constructor arguments of an event_attributes . | |
scoped_range_in () noexcept | |
Default constructor creates a scoped_range_in with no message, color, payload, nor category. | |
void * | operator new (std::size_t)=delete |
Delete operator new to disallow heap allocated objects. | |
scoped_range_in (scoped_range_in const &)=delete | |
scoped_range_in & | operator= (scoped_range_in const &)=delete |
scoped_range_in (scoped_range_in &&)=delete | |
scoped_range_in & | operator= (scoped_range_in &&)=delete |
~scoped_range_in () noexcept | |
Destroy the scoped_range_in, 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 scoped_range_in
object is created/destroyed on different threads.
scoped_range_in
is neither movable nor copyable.
scoped_range_in
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 scoped_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 scoped_range_in
with the specified event_attributes
Example:
[in] | attr | event_attributes that describes the desired attributes of the range. |
|
inlineexplicitnoexcept |
Constructs a scoped_range_in
from the constructor arguments of an event_attributes
.
Forwards the arguments args...
to construct an event_attributes
object. The event_attributes
object is then associated with the scoped_range_in
.
For more detail, see event_attributes
documentation.
Example:
[in] | args | Arguments to used to construct an event_attributes associated with this range. |
|
inlinenoexcept |
Default constructor creates a scoped_range_in
with no message, color, payload, nor category.
|
inlinenoexcept |
Destroy the scoped_range_in, ending the NVTX range event.
|
delete |
Delete operator new
to disallow heap allocated objects.
scoped_range_in
must follow RAII semantics to guarantee proper push/pop semantics.