NVTX C++ API Reference 1.0
C++ convenience wrappers for NVTX v3 C API
|
A RAII object for creating a NVTX range within a domain that can be created and destroyed on different threads. More...
#include <nvtx3.hpp>
Public Member Functions | |
unique_range_in (event_attributes const &attr) noexcept | |
Construct a new unique_range_in object with the specified event attributes. | |
template<typename... Args> | |
unique_range_in (Args const &... args) noexcept | |
Constructs a unique_range_in from the constructor arguments of an event_attributes . | |
constexpr | unique_range_in () noexcept |
Default constructor creates a unique_range_in with no message, color, payload, nor category. | |
~unique_range_in () noexcept=default | |
Destroy the unique_range_in ending the range. | |
unique_range_in (unique_range_in &&other) noexcept=default | |
Move constructor allows taking ownership of the NVTX range from another unique_range_in . | |
unique_range_in & | operator= (unique_range_in &&other) noexcept=default |
Move assignment operator allows taking ownership of an NVTX range from another unique_range_in . | |
unique_range_in (unique_range_in const &)=delete | |
unique_range_in & | operator= (unique_range_in const &)=delete |
A RAII object for creating a NVTX range within a domain that can be created and destroyed on different threads.
When constructed, begins a NVTX range in the specified domain. Upon destruction, ends the NVTX range.
Similar to nvtx3::scoped_range_in
, with a few key differences:
unique_range
objects can be destroyed in an order whereas scoped_range
objects must be destroyed in exact reverse creation orderunique_range
can start and end on different threadsunique_range
is movableunique_range
objects can be constructed as heap objectsThere is extra overhead associated with unique_range
constructs and therefore use of nvtx3::scoped_range_in
should be preferred.
D | Type containing name member used to identify the domain to which the unique_range_in belongs. Else, domain::global to indicate that the global NVTX domain should be used. |
|
inlineexplicitnoexcept |
Construct a new unique_range_in object with the specified event attributes.
Example:
[in] | attr | event_attributes that describes the desired attributes of the range. |
|
inlineexplicitnoexcept |
Constructs a unique_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 unique_range_in
.
For more detail, see event_attributes
documentation.
Example:
[in] | args | Variadic parameter pack of arguments to construct an event_attributes associated with this range. |
|
inlineconstexprnoexcept |
Default constructor creates a unique_range_in
with no message, color, payload, nor category.
|
defaultnoexcept |
Move constructor allows taking ownership of the NVTX range from another unique_range_in
.
other | The range to take ownership of |
|
delete |
Copy construction is not allowed to prevent multiple objects from owning the same range handle
|
defaultnoexcept |
Move assignment operator allows taking ownership of an NVTX range from another unique_range_in
.
other | The range to take ownership of |
|
delete |
Copy assignment is not allowed to prevent multiple objects from owning the same range handle