NVTX++
3.0
C++ convenience wrappers for NVTX.
|
Describes the attributes of a NVTX event. More...
#include <nvtx3.hpp>
Public Types | |
using | value_type = nvtxEventAttributes_t |
Public Member Functions | |
constexpr | event_attributes () noexcept |
Default constructor creates an event_attributes with no category, color, payload, nor message. | |
template<typename... Args> | |
NVTX3_RELAXED_CONSTEXPR | event_attributes (category const &c, Args const &...args) noexcept |
Variadic constructor where the first argument is a category . More... | |
template<typename... Args> | |
NVTX3_RELAXED_CONSTEXPR | event_attributes (color const &c, Args const &...args) noexcept |
Variadic constructor where the first argument is a color . More... | |
template<typename... Args> | |
NVTX3_RELAXED_CONSTEXPR | event_attributes (payload const &p, Args const &...args) noexcept |
Variadic constructor where the first argument is a payload . More... | |
template<typename... Args> | |
NVTX3_RELAXED_CONSTEXPR | event_attributes (message const &m, Args const &...args) noexcept |
Variadic constructor where the first argument is a message . More... | |
event_attributes (event_attributes const &)=default | |
event_attributes & | operator= (event_attributes const &)=default |
event_attributes (event_attributes &&)=default | |
event_attributes & | operator= (event_attributes &&)=default |
constexpr value_type const * | get () const noexcept |
Get raw pointer to underlying NVTX attributes object. | |
Describes the attributes of a NVTX event.
NVTX events can be customized via four "attributes":
color
.message
.payload
.category
.These component attributes are specified via an event_attributes
object. See nvtx3::color
, nvtx3::message
, nvtx3::payload
, and nvtx3::category
for how these individual attributes are constructed.
While it is possible to specify all four attributes, it is common to want to only specify a subset of attributes and use default values for the others. For convenience, event_attributes
can be constructed from any number of attribute components in any order.
Example:
|
inlineexplicitnoexcept |
Variadic constructor where the first argument is a category
.
Sets the value of the EventAttribute
s category based on c
and forwards the remaining variadic parameter pack to the next constructor.
|
inlineexplicitnoexcept |
Variadic constructor where the first argument is a color
.
Sets the value of the EventAttribute
s color based on c
and forwards the remaining variadic parameter pack to the next constructor.
|
inlineexplicitnoexcept |
Variadic constructor where the first argument is a payload
.
Sets the value of the EventAttribute
s payload based on p
and forwards the remaining variadic parameter pack to the next constructor.
|
inlineexplicitnoexcept |
Variadic constructor where the first argument is a message
.
Sets the value of the EventAttribute
s message based on m
and forwards the remaining variadic parameter pack to the next constructor.