NVTX C++ API Reference 1.0
C++ convenience wrappers for NVTX v3 C API
Loading...
Searching...
No Matches
Public Member Functions | List of all members
nvtx3::v1::mv2::scope_in< D > Class Template Reference

A domain-scoped handle to a user-registered NVTX scope. More...

#include <nvtx3.hpp>

Public Member Functions

 scope_in (char const *path, detail::scope_type parent=detail::scope_type::none(), uint64_t static_id=0) noexcept
 Register a scope in the given domain.
 
 scope_in (std::string const &path, detail::scope_type parent=detail::scope_type::none(), uint64_t static_id=0) noexcept
 Register a scope in the given domain from the specified path string.
 
uint64_t id () const noexcept
 The registered scope ID (NVTX_SCOPE_NONE on failure).
 

Detailed Description

template<typename D = domain::global>
class nvtx3::v1::mv2::scope_in< D >

A domain-scoped handle to a user-registered NVTX scope.

Calls nvtxScopeRegister at construction to create a scope identified by a path, relative to an optional parent scope. The resulting scope ID can be used anywhere an NVTX scope is expected and, in particular, can be handed to scope_semantic::scope() through the implicit conversion to nvtx3::scope.

Template Parameters
DNVTX domain (defaults to domain::global).

Definition at line 3996 of file nvtx3.hpp.

Constructor & Destructor Documentation

◆ scope_in() [1/2]

template<typename D = domain::global>
nvtx3::v1::mv2::scope_in< D >::scope_in ( char const *  path,
detail::scope_type  parent = detail::scope_type::none(),
uint64_t  static_id = 0 
)
inlineexplicitnoexcept

Register a scope in the given domain.

Parameters
pathPath delimited by '/' characters, relative to parent. See nvtxScopeAttr_t for the full syntax. nullptr and "" are treated equivalently.
parentParent scope. Defaults to scope::none() (which the tool treats as root).
static_idOptional static scope ID, which must be in [NVTX_SCOPE_ID_STATIC_START, NVTX_SCOPE_ID_DYNAMIC_START). Defaults to NVTX_SCOPE_NONE, which lets the tool assign a dynamic ID.

Definition at line 4011 of file nvtx3.hpp.

◆ scope_in() [2/2]

template<typename D = domain::global>
nvtx3::v1::mv2::scope_in< D >::scope_in ( std::string const &  path,
detail::scope_type  parent = detail::scope_type::none(),
uint64_t  static_id = 0 
)
inlineexplicitnoexcept

Register a scope in the given domain from the specified path string.

Parameters
pathPath delimited by '/' characters, relative to parent. See nvtxScopeAttr_t for the full syntax. "" is treated equivalently to nullptr.
parentParent scope. Defaults to scope::none() (which the tool treats as root).
static_idOptional static scope ID, which must be in [NVTX_SCOPE_ID_STATIC_START, NVTX_SCOPE_ID_DYNAMIC_START). Defaults to NVTX_SCOPE_NONE, which lets the tool assign a dynamic ID.

Definition at line 4043 of file nvtx3.hpp.

Member Function Documentation

◆ id()

template<typename D = domain::global>
uint64_t nvtx3::v1::mv2::scope_in< D >::id ( ) const
inlinenoexcept

The registered scope ID (NVTX_SCOPE_NONE on failure).

Definition at line 4049 of file nvtx3.hpp.


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