Allows associating a message string with an NVTX event via its EventAttributes.
More...
#include <nvtx3.hpp>
|
| | message (char const *msg) noexcept |
| | Construct a message whose contents are specified by msg.
|
| |
| | message (std::string const &msg) noexcept |
| | Construct a message whose contents are specified by msg.
|
| |
| | message (std::string &&)=delete |
| | Disallow construction for std::string r-value.
|
| |
| | message (wchar_t const *msg) noexcept |
| | Construct a message whose contents are specified by msg.
|
| |
| | message (std::wstring const &msg) noexcept |
| | Construct a message whose contents are specified by msg.
|
| |
| | message (std::wstring &&)=delete |
| | Disallow construction for std::wstring r-value.
|
| |
| template<typename D > |
| | message (registered_string_in< D > const &msg) noexcept |
| | Construct a message from a registered_string_in.
|
| |
| constexpr | message (nvtxMessageType_t const &type, nvtxMessageValue_t const &value) noexcept |
| | Construct a message from NVTX C API type and value.
|
| |
| | message (nvtxStringHandle_t handle) noexcept |
| | Construct a message from NVTX C API registered string handle.
|
| |
| constexpr value_type | get_value () const noexcept |
| | Return the union holding the value of the message.
|
| |
| constexpr nvtxMessageType_t | get_type () const noexcept |
| | Return the type information about the value the union holds.
|
| |
Allows associating a message string with an NVTX event via its EventAttributes.
Associating a message with an NVTX event through its event_attributes allows for naming events to easily differentiate them from other events.
Every time an NVTX event is created with an associated message, the contents of the message string must be copied. This may cause non-trivial overhead in highly performance sensitive sections of code. Use of a nvtx3::registered_string is recommended in these situations.
Example:
nvtx3::scoped_range range0{attr0};
nvtx3::scoped_range range1{attr1};
Describes the attributes of a NVTX event.
Allows associating a message string with an NVTX event via its EventAttributes.
scoped_range_in< domain::global > scoped_range
Alias for a scoped_range_in in the global NVTX domain.
Definition at line 1827 of file nvtx3.hpp.
◆ value_type
| using nvtx3::v1::mv1::message::value_type = nvtxMessageValue_t |
◆ message() [1/9]
| nvtx3::v1::mv1::message::message |
( |
char const * |
msg | ) |
|
|
inlinenoexcept |
Construct a message whose contents are specified by msg.
- Parameters
-
| msg | The contents of the message |
Definition at line 1836 of file nvtx3.hpp.
◆ message() [2/9]
| nvtx3::v1::mv1::message::message |
( |
std::string const & |
msg | ) |
|
|
inlinenoexcept |
Construct a message whose contents are specified by msg.
- Parameters
-
| msg | The contents of the message |
Definition at line 1846 of file nvtx3.hpp.
◆ message() [3/9]
| nvtx3::v1::mv1::message::message |
( |
std::string && |
| ) |
|
|
delete |
Disallow construction for std::string r-value.
message is a non-owning type and therefore cannot take ownership of an r-value. Therefore, constructing from an r-value is disallowed to prevent a dangling pointer.
◆ message() [4/9]
| nvtx3::v1::mv1::message::message |
( |
wchar_t const * |
msg | ) |
|
|
inlinenoexcept |
Construct a message whose contents are specified by msg.
- Parameters
-
| msg | The contents of the message |
Definition at line 1865 of file nvtx3.hpp.
◆ message() [5/9]
| nvtx3::v1::mv1::message::message |
( |
std::wstring const & |
msg | ) |
|
|
inlinenoexcept |
Construct a message whose contents are specified by msg.
- Parameters
-
| msg | The contents of the message |
Definition at line 1875 of file nvtx3.hpp.
◆ message() [6/9]
| nvtx3::v1::mv1::message::message |
( |
std::wstring && |
| ) |
|
|
delete |
Disallow construction for std::wstring r-value.
message is a non-owning type and therefore cannot take ownership of an r-value. Therefore, constructing from an r-value is disallowed to prevent a dangling pointer.
◆ message() [7/9]
Construct a message from a registered_string_in.
- Template Parameters
-
| D | Type containing name member used to identify the domain to which the registered_string_in belongs. Else, domain::global to indicate that the global NVTX domain should be used. |
- Parameters
-
| msg | The message that has already been registered with NVTX. |
Definition at line 1898 of file nvtx3.hpp.
◆ message() [8/9]
| constexpr nvtx3::v1::mv1::message::message |
( |
nvtxMessageType_t const & |
type, |
|
|
nvtxMessageValue_t const & |
value |
|
) |
| |
|
inlineconstexprnoexcept |
Construct a message from NVTX C API type and value.
- Parameters
-
| type | nvtxMessageType_t enum value indicating type of the payload |
| value | nvtxMessageValue_t union containing message |
Definition at line 1910 of file nvtx3.hpp.
◆ message() [9/9]
| nvtx3::v1::mv1::message::message |
( |
nvtxStringHandle_t |
handle | ) |
|
|
inlinenoexcept |
Construct a message from NVTX C API registered string handle.
- Parameters
-
| handle | nvtxStringHandle_t value of registered string handle |
Definition at line 1922 of file nvtx3.hpp.
◆ get_type()
| constexpr nvtxMessageType_t nvtx3::v1::mv1::message::get_type |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Return the type information about the value the union holds.
Definition at line 1938 of file nvtx3.hpp.
◆ get_value()
| constexpr value_type nvtx3::v1::mv1::message::get_value |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Return the union holding the value of the message.
Definition at line 1932 of file nvtx3.hpp.
The documentation for this class was generated from the following file: