Describes the attributes of a NVTX event.
More...
#include <nvtx3.hpp>
|
constexpr | event_attributes () noexcept |
| Default constructor creates an event_attributes with no category, color, payload, nor message.
|
|
template<typename... Args> |
| event_attributes (category const &c, Args const &... args) noexcept |
| Variadic constructor where the first argument is a category .
|
|
template<typename... Args> |
| event_attributes (color const &c, Args const &... args) noexcept |
| Variadic constructor where the first argument is a color .
|
|
template<typename... Args> |
| event_attributes (payload const &p, Args const &... args) noexcept |
| Variadic constructor where the first argument is a payload .
|
|
template<typename... Args> |
| event_attributes (payload_data const &pd, Args const &... args) noexcept |
| Variadic constructor where the first argument is a single payload_data .
|
|
template<typename... Args> |
| event_attributes (payload_data &&pd, Args const &... args)=delete |
| Deleted constructor for payload_data rvalue references.
|
|
template<typename T , typename... Args, typename = typename std::enable_if< detail::has_data_member<T, payload_data>::value && detail::has_size_member<T>::value>::type> |
| event_attributes (T &&pdc, Args const &... args) noexcept |
| Variadic constructor template for containers of payload_data .
|
|
template<typename... Args> |
| event_attributes (message const &m, Args const &... args) noexcept |
| Variadic constructor where the first argument is a message .
|
|
| 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: color used to visualize the event in tools such as Nsight Systems. See
color
.
- message: Custom message string. See
message
.
- payload: User-defined numerical value. See
payload
.
- category: Intra-domain grouping. See
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:
"message",
using namespace nvtx3;
Object for intra-domain grouping of NVTX events.
Describes the attributes of a NVTX event.
constexpr event_attributes() noexcept
Default constructor creates an event_attributes with no category, color, payload, nor message.
A numerical value that can be associated with an NVTX event via its event_attributes.
scoped_range_in< domain::global > scoped_range
Alias for a scoped_range_in in the global NVTX domain.
Indicates the values of the red, green, and blue color channels for an RGB color to use as an event a...
Definition at line 2249 of file nvtx3.hpp.
◆ value_type
using nvtx3::v1::mv1::event_attributes::value_type = nvtxEventAttributes_t |
◆ event_attributes() [1/8]
constexpr nvtx3::v1::mv1::event_attributes::event_attributes |
( |
| ) |
|
|
inlineconstexprnoexcept |
◆ event_attributes() [2/8]
template<typename... Args>
nvtx3::v1::mv1::event_attributes::event_attributes |
( |
category const & |
c, |
|
|
Args const &... |
args |
|
) |
| |
|
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.
Definition at line 2281 of file nvtx3.hpp.
◆ event_attributes() [3/8]
template<typename... Args>
nvtx3::v1::mv1::event_attributes::event_attributes |
( |
color const & |
c, |
|
|
Args const &... |
args |
|
) |
| |
|
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.
Definition at line 2295 of file nvtx3.hpp.
◆ event_attributes() [4/8]
template<typename... Args>
nvtx3::v1::mv1::event_attributes::event_attributes |
( |
payload const & |
p, |
|
|
Args const &... |
args |
|
) |
| |
|
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.
Definition at line 2310 of file nvtx3.hpp.
◆ event_attributes() [5/8]
template<typename... Args>
nvtx3::v1::mv1::event_attributes::event_attributes |
( |
payload_data const & |
pd, |
|
|
Args const &... |
args |
|
) |
| |
|
inlineexplicitnoexcept |
Variadic constructor where the first argument is a single payload_data
.
Sets the value of the EventAttribute
s payload data based on pd
and forwards the remaining variadic parameter pack to the next constructor.
Definition at line 2325 of file nvtx3.hpp.
◆ event_attributes() [6/8]
template<typename... Args>
nvtx3::v1::mv1::event_attributes::event_attributes |
( |
payload_data && |
pd, |
|
|
Args const &... |
args |
|
) |
| |
|
explicitdelete |
Deleted constructor for payload_data
rvalue references.
event_attributes
is non-owning and therefore cannot take ownership of an r-value payload_data
. Therefore this constructor is deleted by default to prevent dangling pointers.
◆ event_attributes() [7/8]
template<typename T , typename... Args, typename = typename std::enable_if< detail::has_data_member<T, payload_data>::value && detail::has_size_member<T>::value>::type>
nvtx3::v1::mv1::event_attributes::event_attributes |
( |
T && |
pdc, |
|
|
Args const &... |
args |
|
) |
| |
|
inlineexplicitnoexcept |
Variadic constructor template for containers of payload_data
.
Associates multiple structured payloads contained in pdc
with the event attributes. This constructor is enabled for types that have both a data()
member function returning payload_data*
or const payload_data*
and a size()
member function. E.g., std::vector
or std::array
can be used. Forwards the remaining variadic parameter pack to the next constructor.
Definition at line 2359 of file nvtx3.hpp.
◆ event_attributes() [8/8]
template<typename... Args>
nvtx3::v1::mv1::event_attributes::event_attributes |
( |
message const & |
m, |
|
|
Args const &... |
args |
|
) |
| |
|
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.
Definition at line 2379 of file nvtx3.hpp.
◆ get()
constexpr value_type const * nvtx3::v1::mv1::event_attributes::get |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Get raw pointer to underlying NVTX attributes object.
Definition at line 2396 of file nvtx3.hpp.
The documentation for this class was generated from the following file: