NVTX C++ API Reference 1.0
C++ convenience wrappers for NVTX v3 C API
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
nvtx3::v1::range_handle Struct Reference

Handle used for correlating explicit range start and end events. More...

#include <nvtx3.hpp>

Public Types

using value_type = nvtxRangeId_t
 Type used for the handle's value.
 

Public Member Functions

constexpr range_handle (value_type id) noexcept
 Construct a range_handle from the given id.
 
constexpr range_handle () noexcept=default
 Constructs a null range handle.
 
constexpr operator bool () const noexcept
 Checks whether this handle is null.
 
constexpr range_handle (std::nullptr_t) noexcept
 Implicit conversion from nullptr constructs a null handle.
 
constexpr value_type get_value () const noexcept
 Returns the range_handle's value.
 

Detailed Description

Handle used for correlating explicit range start and end events.

A handle is "null" if it does not correspond to any range.

Definition at line 2227 of file nvtx3.hpp.

Member Typedef Documentation

◆ value_type

using nvtx3::v1::range_handle::value_type = nvtxRangeId_t

Type used for the handle's value.

Definition at line 2229 of file nvtx3.hpp.

Constructor & Destructor Documentation

◆ range_handle() [1/3]

constexpr nvtx3::v1::range_handle::range_handle ( value_type  id)
inlineexplicitconstexprnoexcept

Construct a range_handle from the given id.

Definition at line 2236 of file nvtx3.hpp.

◆ range_handle() [2/3]

constexpr nvtx3::v1::range_handle::range_handle ( )
constexprdefaultnoexcept

Constructs a null range handle.

A null range_handle corresponds to no range. Calling end_range on a null handle is undefined behavior when a tool is active.

◆ range_handle() [3/3]

constexpr nvtx3::v1::range_handle::range_handle ( std::nullptr_t  )
inlineconstexprnoexcept

Implicit conversion from nullptr constructs a null handle.

Satisfies the "NullablePointer" requirement to make range_handle comparable with nullptr.

Definition at line 2266 of file nvtx3.hpp.

Member Function Documentation

◆ get_value()

constexpr value_type nvtx3::v1::range_handle::get_value ( ) const
inlineconstexprnoexcept

Returns the range_handle's value.

Returns
value_type The handle's value

Definition at line 2273 of file nvtx3.hpp.

◆ operator bool()

constexpr nvtx3::v1::range_handle::operator bool ( ) const
inlineexplicitconstexprnoexcept

Checks whether this handle is null.

Provides contextual conversion to bool.

range_handle handle{};
if (handle) {...}
Handle used for correlating explicit range start and end events.
Definition nvtx3.hpp:2227

Definition at line 2258 of file nvtx3.hpp.


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