NVTX++  3.0
C++ convenience wrappers for NVTX.
Public Types | Public Member Functions | List of all members
nvtx3::payload Class Reference

A numerical value that can be associated with an NVTX event via its event_attributes. More...

#include <nvtx3.hpp>

Public Types

using value_type = typename nvtxEventAttributes_v2::payload_t
 

Public Member Functions

NVTX3_RELAXED_CONSTEXPR payload (int64_t value) noexcept
 Construct a payload from a signed, 8 byte integer. More...
 
NVTX3_RELAXED_CONSTEXPR payload (int32_t value) noexcept
 Construct a payload from a signed, 4 byte integer. More...
 
NVTX3_RELAXED_CONSTEXPR payload (uint64_t value) noexcept
 Construct a payload from an unsigned, 8 byte integer. More...
 
NVTX3_RELAXED_CONSTEXPR payload (uint32_t value) noexcept
 Construct a payload from an unsigned, 4 byte integer. More...
 
NVTX3_RELAXED_CONSTEXPR payload (float value) noexcept
 Construct a payload from a single-precision floating point value. More...
 
NVTX3_RELAXED_CONSTEXPR payload (double value) noexcept
 Construct a payload from a double-precision floating point value. More...
 
NVTX3_RELAXED_CONSTEXPR value_type get_value () const noexcept
 Return the union holding the value of the payload.
 
NVTX3_RELAXED_CONSTEXPR nvtxPayloadType_t get_type () const noexcept
 Return the information about the type the union holds.
 

Detailed Description

A numerical value that can be associated with an NVTX event via its event_attributes.

Example:

nvtx3:: event_attributes attr{nvtx3::payload{42}}; // Constructs a payload
from
// the `int32_t` value 42
// `range0` will have an int32_t payload of 42
nvtx3::thread_range range0{attr};
// range1 has double payload of 3.14

Constructor & Destructor Documentation

NVTX3_RELAXED_CONSTEXPR nvtx3::payload::payload ( int64_t  value)
inlineexplicitnoexcept

Construct a payload from a signed, 8 byte integer.

Parameters
valueValue to use as contents of the payload
NVTX3_RELAXED_CONSTEXPR nvtx3::payload::payload ( int32_t  value)
inlineexplicitnoexcept

Construct a payload from a signed, 4 byte integer.

Parameters
valueValue to use as contents of the payload
NVTX3_RELAXED_CONSTEXPR nvtx3::payload::payload ( uint64_t  value)
inlineexplicitnoexcept

Construct a payload from an unsigned, 8 byte integer.

Parameters
valueValue to use as contents of the payload
NVTX3_RELAXED_CONSTEXPR nvtx3::payload::payload ( uint32_t  value)
inlineexplicitnoexcept

Construct a payload from an unsigned, 4 byte integer.

Parameters
valueValue to use as contents of the payload
NVTX3_RELAXED_CONSTEXPR nvtx3::payload::payload ( float  value)
inlineexplicitnoexcept

Construct a payload from a single-precision floating point value.

Parameters
valueValue to use as contents of the payload
NVTX3_RELAXED_CONSTEXPR nvtx3::payload::payload ( double  value)
inlineexplicitnoexcept

Construct a payload from a double-precision floating point value.

Parameters
valueValue to use as contents of the payload

The documentation for this class was generated from the following file: