21#if defined(NVTX_AS_SYSTEM_HEADER)
23#pragma clang system_header
24#elif defined(__GNUC__) || defined(__NVCOMPILER)
25#pragma GCC system_header
26#elif defined(_MSC_VER)
32#define NVTX3_CPP_VERSION_MAJOR 1
33#define NVTX3_CPP_VERSION_MINOR 0
55#if !defined(NVTX3_CPP_REQUIRE_EXPLICIT_VERSION)
59 #define NVTX3_INLINE_THIS_VERSION
61 #if !defined(NVTX3_CPP_INLINED_VERSION_MAJOR)
76 #define NVTX3_CPP_INLINED_VERSION_MAJOR 1
88 #define NVTX3_CPP_INLINED_VERSION_MINOR 0
89 #elif NVTX3_CPP_INLINED_VERSION_MAJOR != NVTX3_CPP_VERSION_MAJOR
94 "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."
95 #elif (NVTX3_CPP_INLINED_VERSION_MAJOR == NVTX3_CPP_VERSION_MAJOR) && \
96 (NVTX3_CPP_INLINED_VERSION_MINOR < NVTX3_CPP_VERSION_MINOR)
101 #undef NVTX3_CPP_INLINED_VERSION_MINOR
102 #define NVTX3_CPP_INLINED_VERSION_MINOR 0
596#if !defined(NVTX3_USE_CHECKED_OVERLOADS_FOR_GET)
597#if defined(_MSC_VER) && _MSC_VER < 1914 \
598 || defined(__GNUC__) && __GNUC__ == 8 && __GNUC_MINOR__ < 4
599#define NVTX3_USE_CHECKED_OVERLOADS_FOR_GET 0
601#define NVTX3_USE_CHECKED_OVERLOADS_FOR_GET 1
603#define NVTX3_USE_CHECKED_OVERLOADS_FOR_GET_DEFINED_HERE
608#define NVTX3_CONCAT(A, B) A##B
609#define NVTX3_NAMESPACE_FOR(VERSION) NVTX3_CONCAT(v, VERSION)
610#define NVTX3_VERSION_NAMESPACE NVTX3_NAMESPACE_FOR(NVTX3_CPP_VERSION_MAJOR)
615#if defined(NVTX3_INLINE_THIS_VERSION)
616#define NVTX3_INLINE_IF_REQUESTED inline
618#define NVTX3_INLINE_IF_REQUESTED
631#if __cpp_constexpr >= 201304L
632#define NVTX3_CONSTEXPR_IF_CPP14 constexpr
634#define NVTX3_CONSTEXPR_IF_CPP14
638#if !defined(__has_cpp_attribute)
639#define __has_cpp_attribute(x) 0
641#if __has_cpp_attribute(maybe_unused)
642#define NVTX3_MAYBE_UNUSED [[maybe_unused]]
644#define NVTX3_MAYBE_UNUSED
646#if __has_cpp_attribute(nodiscard)
647#define NVTX3_NO_DISCARD [[nodiscard]]
649#define NVTX3_NO_DISCARD
657#if !defined(NVTX3_STATIC_ASSERT)
658#define NVTX3_STATIC_ASSERT(condition, message) static_assert(condition, message)
659#define NVTX3_STATIC_ASSERT_DEFINED_HERE
664#ifndef NVTX3_CPP_DEFINITIONS_V1_0
665#define NVTX3_CPP_DEFINITIONS_V1_0
667#include "nvToolsExt.h"
671#include <type_traits>
677NVTX3_INLINE_IF_REQUESTED
namespace NVTX3_VERSION_NAMESPACE
682template <
typename Unused>
683struct always_false : std::false_type {};
685template <
typename T,
typename =
void>
686struct has_name : std::false_type {};
688struct has_name<T, decltype((void)T::name, void())> : std::true_type {};
690template <
typename T,
typename =
void>
691struct has_id : std::false_type {};
693struct has_id<T, decltype((void)T::id, void())> : std::true_type {};
695template <
typename T,
typename =
void>
696struct has_message : std::false_type {};
698struct has_message<T, decltype((void)T::message, void())> : std::true_type {};
700template <
typename T,
typename =
void>
701struct is_c_string : std::false_type {};
703struct is_c_string<T, typename std::enable_if<
704 std::is_convertible<T, char const* >::value ||
705 std::is_convertible<T, wchar_t const*>::value
706>::type> : std::true_type {};
709using is_uint32 = std::is_same<typename std::decay<T>::type, uint32_t>;
711template <
typename... Args>
712static inline void silence_unused(Args
const&...)
noexcept {}
790#if NVTX3_USE_CHECKED_OVERLOADS_FOR_GET
835 template <
typename D =
global,
836 typename std::enable_if<
837 detail::is_c_string<
decltype(D::name)>::value
841 static domain const d(D::name);
850 template <
typename D = global,
851 typename std::enable_if<
852 !detail::is_c_string<
decltype(D::name)>::value
856 NVTX3_STATIC_ASSERT(detail::always_false<D>::value,
857 "Type used to identify an NVTX domain must contain a static constexpr member "
858 "called 'name' of type const char* or const wchar_t* -- 'name' member is not "
859 "convertible to either of those types");
860 static domain const unused;
868 template <
typename D = global,
869 typename std::enable_if<
870 !detail::has_name<D>::value
874 NVTX3_STATIC_ASSERT(detail::always_false<D>::value,
875 "Type used to identify an NVTX domain must contain a static constexpr member "
876 "called 'name' of type const char* or const wchar_t* -- 'name' member is missing");
877 static domain const unused;
881 template <
typename D = global>
882 NVTX3_NO_DISCARD
static domain const& get() noexcept
884 static domain const d(D::name);
895 operator nvtxDomainHandle_t() const noexcept {
return _domain; }
906 explicit domain(
char const* name) noexcept : _domain{nvtxDomainCreateA(name)} {}
916 explicit domain(
wchar_t const* name) noexcept : _domain{nvtxDomainCreateW(name)} {}
926 explicit domain(std::string
const& name) noexcept : domain{name.c_str()} {}
936 explicit domain(std::wstring
const& name) noexcept : domain{name.c_str()} {}
946 constexpr domain() noexcept {}
965 nvtxDomainHandle_t
const _domain{};
982NVTX3_NO_DISCARD
inline domain const& domain::get<domain::global>() noexcept
1011 : red{red_}, green{green_}, blue{blue_}
1043 :
rgb{red_, green_, blue_}, alpha{alpha_}
1090 :
color{from_bytes_msb_to_lsb(argb_.alpha, argb_.red, argb_.green, argb_.blue)}
1103 :
color{from_bytes_msb_to_lsb(0xFF, rgb_.red, rgb_.green, rgb_.blue)}
1117 constexpr nvtxColorType_t
get_type() const noexcept {
return _type; }
1132 constexpr static value_type from_bytes_msb_to_lsb(
1136 uint8_t byte0)
noexcept
1138 return uint32_t{byte3} << 24 | uint32_t{byte2} << 16 | uint32_t{byte1} << 8 | uint32_t{byte0};
1141 value_type _value{};
1142 nvtxColorType_t _type{NVTX_COLOR_ARGB};
1248template <
typename D = domain::global>
1251#if NVTX3_USE_CHECKED_OVERLOADS_FOR_GET
1286 template <
typename C,
1287 typename std::enable_if<
1288 detail::is_c_string<
decltype(C::name)>::value &&
1289 detail::is_uint32<
decltype(C::id)>::value
1303 template <
typename C,
1304 typename std::enable_if<
1305 !detail::is_c_string<
decltype(C::name)>::value ||
1306 !detail::is_uint32<
decltype(C::id)>::value
1310 NVTX3_STATIC_ASSERT(detail::is_c_string<
decltype(C::name)>::value,
1311 "Type used to name an NVTX category must contain a static constexpr member "
1312 "called 'name' of type const char* or const wchar_t* -- 'name' member is not "
1313 "convertible to either of those types");
1314 NVTX3_STATIC_ASSERT(detail::is_uint32<
decltype(C::id)>::value,
1315 "Type used to name an NVTX category must contain a static constexpr member "
1316 "called 'id' of type uint32_t -- 'id' member is the wrong type");
1325 template <
typename C,
1326 typename std::enable_if<
1327 !detail::has_name<C>::value ||
1328 !detail::has_id<C>::value
1332 NVTX3_STATIC_ASSERT(detail::has_name<C>::value,
1333 "Type used to name an NVTX category must contain a static constexpr member "
1334 "called 'name' of type const char* or const wchar_t* -- 'name' member is missing");
1335 NVTX3_STATIC_ASSERT(detail::has_id<C>::value,
1336 "Type used to name an NVTX category must contain a static constexpr member "
1337 "called 'id' of type uint32_t -- 'id' member is missing");
1342 template <
typename C>
1368 nvtxDomainNameCategoryA(domain::get<D>(), get_id(), name);
1388 nvtxDomainNameCategoryW(domain::get<D>(), get_id(), name);
1448template <
typename D = domain::global>
1451#if NVTX3_USE_CHECKED_OVERLOADS_FOR_GET
1485 template <
typename M,
1486 typename std::enable_if<
1487 detail::is_c_string<
decltype(M::message)>::value
1500 template <
typename M,
1501 typename std::enable_if<
1502 !detail::is_c_string<
decltype(M::message)>::value
1506 NVTX3_STATIC_ASSERT(detail::always_false<M>::value,
1507 "Type used to register an NVTX string must contain a static constexpr member "
1508 "called 'message' of type const char* or const wchar_t* -- 'message' member is "
1509 "not convertible to either of those types");
1518 template <
typename M,
1519 typename std::enable_if<
1520 !detail::has_message<M>::value
1524 NVTX3_STATIC_ASSERT(detail::always_false<M>::value,
1525 "Type used to register an NVTX string must contain a static constexpr member "
1526 "called 'message' of type const char* or const wchar_t* -- 'message' member "
1532 template <
typename M>
1552 : handle_{nvtxDomainRegisterStringA(domain::get<D>(), msg)}
1582 : handle_{nvtxDomainRegisterStringW(domain::get<D>(), msg)}
1604 nvtxStringHandle_t
get_handle() const noexcept {
return handle_; }
1617 nvtxStringHandle_t handle_{};
1666 using value_type = nvtxMessageValue_t;
1673 NVTX3_CONSTEXPR_IF_CPP14
message(
char const* msg) noexcept : type_{NVTX_MESSAGE_TYPE_ASCII}
1700 NVTX3_CONSTEXPR_IF_CPP14
message(
wchar_t const* msg) noexcept : type_{NVTX_MESSAGE_TYPE_UNICODE}
1702 value_.unicode = msg;
1730 template <
typename D>
1732 : type_{NVTX_MESSAGE_TYPE_REGISTERED}
1734 value_.registered = msg.get_handle();
1744 nvtxMessageType_t
const& type,
1745 nvtxMessageValue_t
const& value) noexcept
1746 : type_{type}, value_(value)
1755 NVTX3_CONSTEXPR_IF_CPP14
message(nvtxStringHandle_t handle) noexcept
1756 : type_{NVTX_MESSAGE_TYPE_REGISTERED}
1758 value_.registered = handle;
1765 constexpr value_type
get_value() const noexcept {
return value_; }
1771 constexpr nvtxMessageType_t
get_type() const noexcept {
return type_; }
1774 nvtxMessageType_t type_{};
1775 nvtxMessageValue_t value_{};
1796 using value_type =
typename nvtxEventAttributes_v2::payload_t;
1803 NVTX3_CONSTEXPR_IF_CPP14
explicit payload(int64_t value) noexcept
1804 : type_{NVTX_PAYLOAD_TYPE_INT64}, value_{}
1806 value_.llValue = value;
1814 NVTX3_CONSTEXPR_IF_CPP14
explicit payload(int32_t value) noexcept
1815 : type_{NVTX_PAYLOAD_TYPE_INT32}, value_{}
1817 value_.iValue = value;
1825 NVTX3_CONSTEXPR_IF_CPP14
explicit payload(uint64_t value) noexcept
1826 : type_{NVTX_PAYLOAD_TYPE_UNSIGNED_INT64}, value_{}
1828 value_.ullValue = value;
1836 NVTX3_CONSTEXPR_IF_CPP14
explicit payload(uint32_t value) noexcept
1837 : type_{NVTX_PAYLOAD_TYPE_UNSIGNED_INT32}, value_{}
1839 value_.uiValue = value;
1848 NVTX3_CONSTEXPR_IF_CPP14
explicit payload(
float value) noexcept
1849 : type_{NVTX_PAYLOAD_TYPE_FLOAT}, value_{}
1851 value_.fValue = value;
1860 NVTX3_CONSTEXPR_IF_CPP14
explicit payload(
double value) noexcept
1861 : type_{NVTX_PAYLOAD_TYPE_DOUBLE}, value_{}
1863 value_.dValue = value;
1873 nvtxPayloadType_t
const& type,
1874 value_type
const& value) noexcept
1875 : type_{type}, value_(value)
1883 constexpr value_type
get_value() const noexcept {
return value_; }
1889 constexpr nvtxPayloadType_t
get_type() const noexcept {
return type_; }
1892 nvtxPayloadType_t type_;
1956 using value_type = nvtxEventAttributes_t;
1965 sizeof(nvtxEventAttributes_t),
1969 NVTX_PAYLOAD_UNKNOWN,
1972 NVTX_MESSAGE_UNKNOWN,
1985 template <
typename... Args>
1989 attributes_.category = c.get_id();
1999 template <
typename... Args>
2003 attributes_.color = c.get_value();
2004 attributes_.colorType = c.get_type();
2014 template <
typename... Args>
2018 attributes_.payload = p.get_value();
2019 attributes_.payloadType = p.get_type();
2029 template <
typename... Args>
2033 attributes_.message = m.get_value();
2034 attributes_.messageType = m.get_type();
2047 constexpr value_type
const*
get() const noexcept {
return &attributes_; }
2050 value_type attributes_{};
2100template <
class D = domain::global>
2120 nvtxDomainRangePushEx(domain::get<D>(), attr.get());
2146 template <
typename... Args>
2165 void*
operator new(std::size_t) =
delete;
2178 nvtxDomainRangePop(domain::get<D>());
2192template <
typename D = domain::global>
2193class NVTX3_MAYBE_UNUSED optional_scoped_range_in
2196 optional_scoped_range_in() =
default;
2205 if (initialized) {
return; }
2207 nvtxDomainRangePushEx(domain::get<D>(), attr.
get());
2214 ~optional_scoped_range_in()
noexcept
2217 if (initialized) { nvtxDomainRangePop(domain::get<D>()); }
2221 void*
operator new(std::size_t) =
delete;
2222 optional_scoped_range_in(optional_scoped_range_in
const&) =
delete;
2223 optional_scoped_range_in& operator=(optional_scoped_range_in
const&) =
delete;
2224 optional_scoped_range_in(optional_scoped_range_in&&) =
delete;
2225 optional_scoped_range_in& operator=(optional_scoped_range_in&&) =
delete;
2229 bool initialized =
false;
2273 constexpr explicit operator
bool() const noexcept {
return get_value() != null_range_id; }
2292 static constexpr value_type null_range_id = nvtxRangeId_t{0};
2294 value_type _range_id{null_range_id};
2305 return lhs.get_value() == rhs.get_value();
2345template <
typename D = domain::global>
2349 return range_handle{nvtxDomainRangeStartEx(domain::get<D>(), attr.get())};
2386template <
typename D = domain::global,
typename... Args>
2392 detail::silence_unused(args...);
2426 return start_range_in<domain::global>(attr);
2460template <
typename... Args>
2464 return start_range_in<domain::global>(args...);
2466 detail::silence_unused(args...);
2486template <
typename D = domain::global>
2490 nvtxDomainRangeEnd(domain::get<D>(), r.get_value());
2512 end_range_in<domain::global>(r);
2539template <
typename D = domain::global>
2556 : handle_{start_range_in<D>(attr)}
2579 template <
typename... Args>
2624 struct end_range_handle {
2626 void operator()(
range_handle h)
const noexcept { end_range_in<D>(h); }
2630 std::unique_ptr<range_handle, end_range_handle> handle_;
2662template <
typename D = domain::global>
2666 nvtxDomainMarkEx(domain::get<D>(), attr.get());
2699template <
typename D = domain::global,
typename... Args>
2705 detail::silence_unused(args...);
2732 mark_in<domain::global>(attr);
2762template <
typename... Args>
2763inline void mark(Args
const&... args)
noexcept
2766 mark_in<domain::global>(args...);
2768 detail::silence_unused(args...);
2805#define NVTX3_V1_FUNC_RANGE_IN(D) \
2806 static ::nvtx3::v1::registered_string_in<D> const nvtx3_func_name__{__func__}; \
2807 static ::nvtx3::v1::event_attributes const nvtx3_func_attr__{nvtx3_func_name__}; \
2808 ::nvtx3::v1::scoped_range_in<D> const nvtx3_range__{nvtx3_func_attr__}
2826#define NVTX3_V1_FUNC_RANGE_IF_IN(D, C) \
2827 ::nvtx3::v1::detail::optional_scoped_range_in<D> optional_nvtx3_range__; \
2829 static ::nvtx3::v1::registered_string_in<D> const nvtx3_func_name__{__func__}; \
2830 static ::nvtx3::v1::event_attributes const nvtx3_func_attr__{nvtx3_func_name__}; \
2831 optional_nvtx3_range__.begin(nvtx3_func_attr__); \
2834#define NVTX3_V1_FUNC_RANGE_IN(D) (void)0
2835#define NVTX3_V1_FUNC_RANGE_IF_IN(D, C) (void)(C)
2860#define NVTX3_V1_FUNC_RANGE() NVTX3_V1_FUNC_RANGE_IN(::nvtx3::v1::domain::global)
2873#define NVTX3_V1_FUNC_RANGE_IF(C) NVTX3_V1_FUNC_RANGE_IF_IN(::nvtx3::v1::domain::global, C)
2877#if defined(NVTX3_INLINE_THIS_VERSION)
2879#define NVTX3_FUNC_RANGE NVTX3_V1_FUNC_RANGE
2880#define NVTX3_FUNC_RANGE_IF NVTX3_V1_FUNC_RANGE_IF
2881#define NVTX3_FUNC_RANGE_IN NVTX3_V1_FUNC_RANGE_IN
2882#define NVTX3_FUNC_RANGE_IF_IN NVTX3_V1_FUNC_RANGE_IF_IN
2919#undef NVTX3_CPP_VERSION_MAJOR
2920#undef NVTX3_CPP_VERSION_MINOR
2922#undef NVTX3_NAMESPACE_FOR
2923#undef NVTX3_VERSION_NAMESPACE
2924#undef NVTX3_INLINE_IF_REQUESTED
2925#undef NVTX3_CONSTEXPR_IF_CPP14
2926#undef NVTX3_MAYBE_UNUSED
2927#undef NVTX3_NO_DISCARD
2929#if defined(NVTX3_INLINE_THIS_VERSION)
2930#undef NVTX3_INLINE_THIS_VERSION
2933#if defined(NVTX3_USE_CHECKED_OVERLOADS_FOR_GET_DEFINED_HERE)
2934#undef NVTX3_USE_CHECKED_OVERLOADS_FOR_GET_DEFINED_HERE
2935#undef NVTX3_USE_CHECKED_OVERLOADS_FOR_GET
2938#if defined(NVTX3_STATIC_ASSERT_DEFINED_HERE)
2939#undef NVTX3_STATIC_ASSERT_DEFINED_HERE
2940#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 its 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.