18#define NVTX3_CPP_VERSION_MAJOR 1
19#define NVTX3_CPP_VERSION_MINOR 0
41#if !defined(NVTX3_CPP_REQUIRE_EXPLICIT_VERSION)
45 #define NVTX3_INLINE_THIS_VERSION
47 #if !defined(NVTX3_CPP_INLINED_VERSION_MAJOR)
62 #define NVTX3_CPP_INLINED_VERSION_MAJOR 1
74 #define NVTX3_CPP_INLINED_VERSION_MINOR 0
75 #elif NVTX3_CPP_INLINED_VERSION_MAJOR != NVTX3_CPP_VERSION_MAJOR
80 "Two different major versions of the NVTX C++ Wrappers are being included in a single .cpp file, with unversioned symbols enabled in both. Only one major version can enable unversioned symbols in a .cpp file. To disable unversioned symbols, #define NVTX3_CPP_REQUIRE_EXPLICIT_VERSION before #including nvtx3.hpp, and use the explicit-version symbols instead -- this is the preferred way to use nvtx3.hpp from a header file."
81 #elif (NVTX3_CPP_INLINED_VERSION_MAJOR == NVTX3_CPP_VERSION_MAJOR) && \
82 (NVTX3_CPP_INLINED_VERSION_MINOR < NVTX3_CPP_VERSION_MINOR)
87 #undef NVTX3_CPP_INLINED_VERSION_MINOR
88 #define NVTX3_CPP_INLINED_VERSION_MINOR 0
564#if !defined(NVTX3_USE_CHECKED_OVERLOADS_FOR_GET)
565#if defined(_MSC_VER) && _MSC_VER < 1914
576#define NVTX3_USE_CHECKED_OVERLOADS_FOR_GET 0
578#define NVTX3_USE_CHECKED_OVERLOADS_FOR_GET 1
580#define NVTX3_USE_CHECKED_OVERLOADS_FOR_GET_DEFINED_HERE
585#define NVTX3_CONCAT(A, B) A##B
586#define NVTX3_NAMESPACE_FOR(VERSION) NVTX3_CONCAT(v, VERSION)
587#define NVTX3_VERSION_NAMESPACE NVTX3_NAMESPACE_FOR(NVTX3_CPP_VERSION_MAJOR)
592#if defined(NVTX3_INLINE_THIS_VERSION)
593#define NVTX3_INLINE_IF_REQUESTED inline
595#define NVTX3_INLINE_IF_REQUESTED
608#if __cpp_constexpr >= 201304L
609#define NVTX3_CONSTEXPR_IF_CPP14 constexpr
611#define NVTX3_CONSTEXPR_IF_CPP14
619#if !defined(NVTX3_STATIC_ASSERT)
620#define NVTX3_STATIC_ASSERT(condition, message) static_assert(condition, message);
621#define NVTX3_STATIC_ASSERT_DEFINED_HERE
626#ifndef NVTX3_CPP_DEFINITIONS_V1_0
627#define NVTX3_CPP_DEFINITIONS_V1_0
629#include "nvToolsExt.h"
633#include <type_traits>
639NVTX3_INLINE_IF_REQUESTED
namespace NVTX3_VERSION_NAMESPACE
644template <
typename Unused>
645struct always_false : std::false_type {};
647template <
typename T,
typename =
void>
648struct has_name : std::false_type {};
650struct has_name<T, decltype((void)T::name, void())> : std::true_type {};
652template <
typename T,
typename =
void>
653struct has_id : std::false_type {};
655struct has_id<T, decltype((void)T::id, void())> : std::true_type {};
657template <
typename T,
typename =
void>
658struct has_message : std::false_type {};
660struct has_message<T, decltype((void)T::message, void())> : std::true_type {};
662template <
typename T,
typename =
void>
663struct is_c_string : std::false_type {};
665struct is_c_string<T, typename std::enable_if<
666 std::is_convertible<T, char const* >::value ||
667 std::is_convertible<T, wchar_t const*>::value
668>::type> : std::true_type {};
671using is_uint32 = std::is_same<typename std::decay<T>::type, uint32_t>;
749#if NVTX3_USE_CHECKED_OVERLOADS_FOR_GET
794 template <
typename D =
global,
795 typename std::enable_if<
796 detail::is_c_string<
decltype(D::name)>::value
800 static domain const d(D::name);
809 template <
typename D = global,
810 typename std::enable_if<
811 !detail::is_c_string<
decltype(D::name)>::value
815 NVTX3_STATIC_ASSERT(detail::always_false<D>::value,
816 "Type used to identify an NVTX domain must contain a static constexpr member "
817 "called 'name' of type const char* or const wchar_t* -- 'name' member is not "
818 "convertible to either of those types");
819 static domain const unused;
827 template <
typename D = global,
828 typename std::enable_if<
829 !detail::has_name<D>::value
833 NVTX3_STATIC_ASSERT(detail::always_false<D>::value,
834 "Type used to identify an NVTX domain must contain a static constexpr member "
835 "called 'name' of type const char* or const wchar_t* -- 'name' member is missing");
836 static domain const unused;
840 template <
typename D = global>
841 static domain const& get() noexcept
843 static domain const d(D::name);
854 operator nvtxDomainHandle_t() const noexcept {
return _domain; }
865 explicit domain(
char const* name) noexcept : _domain{nvtxDomainCreateA(name)} {}
875 explicit domain(
wchar_t const* name) noexcept : _domain{nvtxDomainCreateW(name)} {}
885 explicit domain(std::string
const& name) noexcept : domain{name.c_str()} {}
895 explicit domain(std::wstring
const& name) noexcept : domain{name.c_str()} {}
924 nvtxDomainHandle_t
const _domain{};
941inline domain const& domain::get<domain::global>() noexcept
970 : red{red_}, green{green_}, blue{blue_}
1002 :
rgb{red_, green_, blue_}, alpha{alpha_}
1049 :
color{from_bytes_msb_to_lsb(argb_.alpha, argb_.red, argb_.green, argb_.blue)}
1062 :
color{from_bytes_msb_to_lsb(0xFF, rgb_.red, rgb_.green, rgb_.blue)}
1076 constexpr nvtxColorType_t
get_type() const noexcept {
return _type; }
1091 constexpr static value_type from_bytes_msb_to_lsb(
1095 uint8_t byte0)
noexcept
1097 return uint32_t{byte3} << 24 | uint32_t{byte2} << 16 | uint32_t{byte1} << 8 | uint32_t{byte0};
1100 value_type _value{};
1101 nvtxColorType_t _type{NVTX_COLOR_ARGB};
1207template <
typename D = domain::global>
1210#if NVTX3_USE_CHECKED_OVERLOADS_FOR_GET
1245 template <
typename C,
1246 typename std::enable_if<
1247 detail::is_c_string<
decltype(C::name)>::value &&
1248 detail::is_uint32<
decltype(C::id)>::value
1262 template <
typename C,
1263 typename std::enable_if<
1264 !detail::is_c_string<
decltype(C::name)>::value ||
1265 !detail::is_uint32<
decltype(C::id)>::value
1269 NVTX3_STATIC_ASSERT(detail::is_c_string<
decltype(C::name)>::value,
1270 "Type used to name an NVTX category must contain a static constexpr member "
1271 "called 'name' of type const char* or const wchar_t* -- 'name' member is not "
1272 "convertible to either of those types");
1273 NVTX3_STATIC_ASSERT(detail::is_uint32<
decltype(C::id)>::value,
1274 "Type used to name an NVTX category must contain a static constexpr member "
1275 "called 'id' of type uint32_t -- 'id' member is the wrong type");
1284 template <
typename C,
1285 typename std::enable_if<
1286 !detail::has_name<C>::value ||
1287 !detail::has_id<C>::value
1291 NVTX3_STATIC_ASSERT(detail::has_name<C>::value,
1292 "Type used to name an NVTX category must contain a static constexpr member "
1293 "called 'name' of type const char* or const wchar_t* -- 'name' member is missing");
1294 NVTX3_STATIC_ASSERT(detail::has_id<C>::value,
1295 "Type used to name an NVTX category must contain a static constexpr member "
1296 "called 'id' of type uint32_t -- 'id' member is missing");
1301 template <
typename C>
1327 nvtxDomainNameCategoryA(domain::get<D>(), get_id(), name);
1347 nvtxDomainNameCategoryW(domain::get<D>(), get_id(), name);
1407template <
typename D = domain::global>
1410#if NVTX3_USE_CHECKED_OVERLOADS_FOR_GET
1444 template <
typename M,
1445 typename std::enable_if<
1446 detail::is_c_string<
decltype(M::message)>::value
1459 template <
typename M,
1460 typename std::enable_if<
1461 !detail::is_c_string<
decltype(M::message)>::value
1465 NVTX3_STATIC_ASSERT(detail::always_false<M>::value,
1466 "Type used to register an NVTX string must contain a static constexpr member "
1467 "called 'message' of type const char* or const wchar_t* -- 'message' member is "
1468 "not convertible to either of those types");
1477 template <
typename M,
1478 typename std::enable_if<
1479 !detail::has_message<M>::value
1483 NVTX3_STATIC_ASSERT(detail::always_false<M>::value,
1484 "Type used to register an NVTX string must contain a static constexpr member "
1485 "called 'message' of type const char* or const wchar_t* -- 'message' member "
1491 template <
typename M>
1511 : handle_{nvtxDomainRegisterStringA(domain::get<D>(), msg)}
1541 : handle_{nvtxDomainRegisterStringW(domain::get<D>(), msg)}
1563 nvtxStringHandle_t
get_handle() const noexcept {
return handle_; }
1576 nvtxStringHandle_t handle_{};
1625 using value_type = nvtxMessageValue_t;
1632 NVTX3_CONSTEXPR_IF_CPP14
message(
char const* msg) noexcept : type_{NVTX_MESSAGE_TYPE_ASCII}
1659 NVTX3_CONSTEXPR_IF_CPP14
message(
wchar_t const* msg) noexcept : type_{NVTX_MESSAGE_TYPE_UNICODE}
1661 value_.unicode = msg;
1689 template <
typename D>
1691 : type_{NVTX_MESSAGE_TYPE_REGISTERED}
1693 value_.registered = msg.get_handle();
1703 nvtxMessageType_t
const& type,
1704 nvtxMessageValue_t
const& value) noexcept
1705 : type_{type}, value_(value)
1714 NVTX3_CONSTEXPR_IF_CPP14
message(nvtxStringHandle_t handle) noexcept
1715 : type_{NVTX_MESSAGE_TYPE_REGISTERED}
1717 value_.registered = handle;
1724 constexpr value_type
get_value() const noexcept {
return value_; }
1730 constexpr nvtxMessageType_t
get_type() const noexcept {
return type_; }
1733 nvtxMessageType_t type_{};
1734 nvtxMessageValue_t value_{};
1755 using value_type =
typename nvtxEventAttributes_v2::payload_t;
1762 NVTX3_CONSTEXPR_IF_CPP14
explicit payload(int64_t value) noexcept
1763 : type_{NVTX_PAYLOAD_TYPE_INT64}, value_{}
1765 value_.llValue = value;
1773 NVTX3_CONSTEXPR_IF_CPP14
explicit payload(int32_t value) noexcept
1774 : type_{NVTX_PAYLOAD_TYPE_INT32}, value_{}
1776 value_.iValue = value;
1784 NVTX3_CONSTEXPR_IF_CPP14
explicit payload(uint64_t value) noexcept
1785 : type_{NVTX_PAYLOAD_TYPE_UNSIGNED_INT64}, value_{}
1787 value_.ullValue = value;
1795 NVTX3_CONSTEXPR_IF_CPP14
explicit payload(uint32_t value) noexcept
1796 : type_{NVTX_PAYLOAD_TYPE_UNSIGNED_INT32}, value_{}
1798 value_.uiValue = value;
1807 NVTX3_CONSTEXPR_IF_CPP14
explicit payload(
float value) noexcept
1808 : type_{NVTX_PAYLOAD_TYPE_FLOAT}, value_{}
1810 value_.fValue = value;
1819 NVTX3_CONSTEXPR_IF_CPP14
explicit payload(
double value) noexcept
1820 : type_{NVTX_PAYLOAD_TYPE_DOUBLE}, value_{}
1822 value_.dValue = value;
1832 nvtxPayloadType_t
const& type,
1833 value_type
const& value) noexcept
1834 : type_{type}, value_(value)
1842 constexpr value_type
get_value() const noexcept {
return value_; }
1848 constexpr nvtxPayloadType_t
get_type() const noexcept {
return type_; }
1851 nvtxPayloadType_t type_;
1915 using value_type = nvtxEventAttributes_t;
1924 sizeof(nvtxEventAttributes_t),
1928 NVTX_PAYLOAD_UNKNOWN,
1931 NVTX_MESSAGE_UNKNOWN,
1944 template <
typename... Args>
1948 attributes_.category = c.get_id();
1958 template <
typename... Args>
1962 attributes_.color = c.get_value();
1963 attributes_.colorType = c.get_type();
1973 template <
typename... Args>
1977 attributes_.payload = p.get_value();
1978 attributes_.payloadType = p.get_type();
1988 template <
typename... Args>
1992 attributes_.message = m.get_value();
1993 attributes_.messageType = m.get_type();
2006 constexpr value_type
const*
get() const noexcept {
return &attributes_; }
2009 value_type attributes_{};
2059template <
class D = domain::global>
2079 nvtxDomainRangePushEx(domain::get<D>(), attr.get());
2105 template <
typename... Args>
2124 void*
operator new(std::size_t) =
delete;
2137 nvtxDomainRangePop(domain::get<D>());
2151template <
typename D = domain::global>
2152class optional_scoped_range_in
2155 optional_scoped_range_in() =
default;
2164 if (initialized) {
return; }
2166 nvtxDomainRangePushEx(domain::get<D>(), attr.
get());
2171 ~optional_scoped_range_in()
noexcept
2174 if (initialized) { nvtxDomainRangePop(domain::get<D>()); }
2178 void*
operator new(std::size_t) =
delete;
2179 optional_scoped_range_in(optional_scoped_range_in
const&) =
delete;
2180 optional_scoped_range_in& operator=(optional_scoped_range_in
const&) =
delete;
2181 optional_scoped_range_in(optional_scoped_range_in&&) =
delete;
2182 optional_scoped_range_in& operator=(optional_scoped_range_in&&) =
delete;
2186 bool initialized =
false;
2230 constexpr explicit operator
bool() const noexcept {
return get_value() != null_range_id; };
2249 static constexpr value_type null_range_id = nvtxRangeId_t{0};
2251 value_type _range_id{null_range_id};
2262 return lhs.get_value() == rhs.get_value();
2302template <
typename D = domain::global>
2306 return range_handle{nvtxDomainRangeStartEx(domain::get<D>(), attr.get())};
2343template <
typename D = domain::global,
typename... Args>
2382 return start_range_in<domain::global>(attr);
2416template <
typename... Args>
2420 return start_range_in<domain::global>(args...);
2441template <
typename D = domain::global>
2445 nvtxDomainRangeEnd(domain::get<D>(), r.get_value());
2467 end_range_in<domain::global>(r);
2494template <
typename D = domain::global>
2511 : handle_{start_range_in<D>(attr)}
2534 template <
typename... Args>
2579 struct end_range_handle {
2581 void operator()(
range_handle h)
const noexcept { end_range_in<D>(h); }
2585 std::unique_ptr<range_handle, end_range_handle> handle_;
2617template <
typename D = domain::global>
2621 nvtxDomainMarkEx(domain::get<D>(), attr.get());
2654template <
typename D = domain::global,
typename... Args>
2685 mark_in<domain::global>(attr);
2713template <
typename... Args>
2714inline void mark(Args
const&... args)
noexcept
2717 mark_in<domain::global>(args...);
2754#define NVTX3_V1_FUNC_RANGE_IN(D) \
2755 static ::nvtx3::v1::registered_string_in<D> const nvtx3_func_name__{__func__}; \
2756 static ::nvtx3::v1::event_attributes const nvtx3_func_attr__{nvtx3_func_name__}; \
2757 ::nvtx3::v1::scoped_range_in<D> const nvtx3_range__{nvtx3_func_attr__};
2775#define NVTX3_V1_FUNC_RANGE_IF_IN(D, C) \
2776 ::nvtx3::v1::detail::optional_scoped_range_in<D> optional_nvtx3_range__; \
2778 static ::nvtx3::v1::registered_string_in<D> const nvtx3_func_name__{__func__}; \
2779 static ::nvtx3::v1::event_attributes const nvtx3_func_attr__{nvtx3_func_name__}; \
2780 optional_nvtx3_range__.begin(nvtx3_func_attr__); \
2783#define NVTX3_V1_FUNC_RANGE_IN(D)
2784#define NVTX3_V1_FUNC_RANGE_IF_IN(D, C)
2809#define NVTX3_V1_FUNC_RANGE() NVTX3_V1_FUNC_RANGE_IN(::nvtx3::v1::domain::global)
2822#define NVTX3_V1_FUNC_RANGE_IF(C) NVTX3_V1_FUNC_RANGE_IF_IN(::nvtx3::v1::domain::global, C)
2826#if defined(NVTX3_INLINE_THIS_VERSION)
2828#define NVTX3_FUNC_RANGE NVTX3_V1_FUNC_RANGE
2829#define NVTX3_FUNC_RANGE_IF NVTX3_V1_FUNC_RANGE_IF
2830#define NVTX3_FUNC_RANGE_IN NVTX3_V1_FUNC_RANGE_IN
2831#define NVTX3_FUNC_RANGE_IF_IN NVTX3_V1_FUNC_RANGE_IF_IN
2868#undef NVTX3_CPP_VERSION_MAJOR
2869#undef NVTX3_CPP_VERSION_MINOR
2871#undef NVTX3_NAMESPACE_FOR
2872#undef NVTX3_VERSION_NAMESPACE
2873#undef NVTX3_INLINE_IF_REQUESTED
2874#undef NVTX3_CONSTEXPR_IF_CPP14
2876#if defined(NVTX3_INLINE_THIS_VERSION)
2877#undef NVTX3_INLINE_THIS_VERSION
2880#if defined(NVTX3_USE_CHECKED_OVERLOADS_FOR_GET_DEFINED_HERE)
2881#undef NVTX3_USE_CHECKED_OVERLOADS_FOR_GET_DEFINED_HERE
2882#undef NVTX3_USE_CHECKED_OVERLOADS_FOR_GET
2885#if defined(NVTX3_STATIC_ASSERT_DEFINED_HERE)
2886#undef NVTX3_STATIC_ASSERT_DEFINED_HERE
2887#undef NVTX3_STATIC_ASSERT
Object for intra-domain grouping of NVTX events.
constexpr category(id_type id) noexcept
Construct a category with the specified id.
constexpr id_type get_id() const noexcept
Returns the id of the category.
uint32_t id_type
Type used for categorys integer id.
Represents a custom color that can be associated with an NVTX event via it's event_attributes.
constexpr value_type get_value() const noexcept
Returns the colors argb hex code.
constexpr color(rgb rgb_) noexcept
Construct a color using the red, green, blue components in rgb.
uint32_t value_type
Type used for the color's value.
constexpr color(value_type hex_code) noexcept
Constructs a color using the value provided by hex_code.
constexpr color(argb argb_) noexcept
Construct a color using the alpha, red, green, blue components in argb.
constexpr nvtxColorType_t get_type() const noexcept
Return the NVTX color type of the color.
domains allow for grouping NVTX events into a single scope to differentiate them from events in other...
static domain const & get() noexcept
Returns reference to an instance of a function local static domain object.
Describes the attributes of a NVTX event.
event_attributes(color const &c, Args const &... args) noexcept
Variadic constructor where the first argument is a color.
event_attributes(category const &c, Args const &... args) noexcept
Variadic constructor where the first argument is a category.
constexpr value_type const * get() const noexcept
Get raw pointer to underlying NVTX attributes object.
event_attributes(payload const &p, Args const &... args) noexcept
Variadic constructor where the first argument is a payload.
event_attributes(message const &m, Args const &... args) noexcept
Variadic constructor where the first argument is a message.
constexpr event_attributes() noexcept
Default constructor creates an event_attributes with no category, color, payload, nor message.
Allows associating a message string with an NVTX event via its EventAttributes.
message(std::string const &msg) noexcept
Construct a message whose contents are specified by msg.
message(wchar_t const *msg) noexcept
Construct a message whose contents are specified by msg.
constexpr value_type get_value() const noexcept
Return the union holding the value of the message.
message(registered_string_in< D > const &msg) noexcept
Construct a message from a registered_string_in.
message(std::wstring &&)=delete
Disallow construction for std::wstring r-value.
constexpr nvtxMessageType_t get_type() const noexcept
Return the type information about the value the union holds.
message(nvtxStringHandle_t handle) noexcept
Construct a message from NVTX C API registered string handle.
message(char const *msg) noexcept
Construct a message whose contents are specified by msg.
constexpr message(nvtxMessageType_t const &type, nvtxMessageValue_t const &value) noexcept
Construct a message from NVTX C API type and value.
message(std::string &&)=delete
Disallow construction for std::string r-value.
message(std::wstring const &msg) noexcept
Construct a message whose contents are specified by msg.
A category with an associated name string.
named_category_in(id_type id, wchar_t const *name) noexcept
Construct a named_category_in with the specified id and name.
static named_category_in const & get() noexcept
Returns a global instance of a named_category_in as a function-local static.
named_category_in(id_type id, char const *name) noexcept
Construct a named_category_in with the specified id and name.
A numerical value that can be associated with an NVTX event via its event_attributes.
payload(int32_t value) noexcept
Construct a payload from a signed, 4 byte integer.
constexpr payload(nvtxPayloadType_t const &type, value_type const &value) noexcept
Construct a payload from NVTX C API type and value.
payload(uint32_t value) noexcept
Construct a payload from an unsigned, 4 byte integer.
payload(int64_t value) noexcept
Construct a payload from a signed, 8 byte integer.
payload(float value) noexcept
Construct a payload from a single-precision floating point value.
payload(double value) noexcept
Construct a payload from a double-precision floating point value.
constexpr value_type get_value() const noexcept
Return the union holding the value of the payload.
constexpr nvtxPayloadType_t get_type() const noexcept
Return the information about the type the union holds.
payload(uint64_t value) noexcept
Construct a payload from an unsigned, 8 byte integer.
A message registered with NVTX.
registered_string_in(char const *msg) noexcept
Constructs a registered_string_in from the specified msg string.
nvtxStringHandle_t get_handle() const noexcept
Returns the registered string's handle.
registered_string_in(std::string const &msg) noexcept
Constructs a registered_string_in from the specified msg string.
registered_string_in(std::wstring const &msg) noexcept
Constructs a registered_string_in from the specified msg string.
registered_string_in(wchar_t const *msg) noexcept
Constructs a registered_string_in from the specified msg string.
static registered_string_in const & get() noexcept
Returns a global instance of a registered_string_in as a function local static.
A RAII object for creating a NVTX range local to a thread within a domain.
scoped_range_in(event_attributes const &attr) noexcept
Construct a scoped_range_in with the specified event_attributes
scoped_range_in(Args const &... args) noexcept
Constructs a scoped_range_in from the constructor arguments of an event_attributes.
scoped_range_in() noexcept
Default constructor creates a scoped_range_in with no message, color, payload, nor category.
~scoped_range_in() noexcept
Destroy the scoped_range_in, ending the NVTX range event.
A RAII object for creating a NVTX range within a domain that can be created and destroyed on differen...
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(Args const &... args) noexcept
Constructs a unique_range_in from the constructor arguments of an event_attributes.
unique_range_in(event_attributes const &attr) noexcept
Construct a new unique_range_in object with the specified event attributes.
void end_range_in(range_handle r) noexcept
Manually end the range associated with the handle r in domain D.
void mark_in(event_attributes const &attr) noexcept
Annotates an instantaneous point in time with a "marker", using the attributes specified by attr.
range_handle start_range_in(event_attributes const &attr) noexcept
Manually begin an NVTX range.
range_handle start_range(event_attributes const &attr) noexcept
Manually begin an NVTX range in the global domain.
constexpr bool operator==(range_handle lhs, range_handle rhs) noexcept
Compares two range_handles for equality.
void mark(event_attributes const &attr) noexcept
Annotates an instantaneous point in time with a "marker", using the attributes specified by attr,...
constexpr bool operator!=(range_handle lhs, range_handle rhs) noexcept
Compares two range_handles for inequality.
void end_range(range_handle r) noexcept
Manually end the range associated with the handle r in the global domain.
Indicates the value of the alpha, red, green, and blue color channels for an ARGB color to use as an ...
constexpr argb(component_type alpha_, component_type red_, component_type green_, component_type blue_) noexcept
Construct an argb with alpha, red, green, and blue channels specified by alpha_, red_,...
Tag type for the "global" NVTX domain.
Handle used for correlating explicit range start and end events.
constexpr range_handle(value_type id) noexcept
Construct a range_handle from the given id.
constexpr value_type get_value() const noexcept
Returns the range_handle's value.
constexpr range_handle() noexcept=default
Constructs a null range handle.
nvtxRangeId_t value_type
Type used for the handle's value.
constexpr range_handle(std::nullptr_t) noexcept
Implicit conversion from nullptr constructs a null handle.
Indicates the values of the red, green, and blue color channels for an RGB color to use as an event a...
constexpr rgb(component_type red_, component_type green_, component_type blue_) noexcept
Construct a rgb with red, green, and blue channels specified by red_, green_, and blue_,...
uint8_t component_type
Type used for component values.