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::time_domain_in< D > Class Template Reference

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

#include <nvtx3.hpp>

Public Member Functions

 time_domain_in (uint64_t timestamp_type_id, detail::scope_type s=detail::scope_type::none(), uint64_t timer_flags=0, int64_t timer_resolution=0, uint64_t timer_start=0, uint64_t static_id=0) noexcept
 Register a time domain in the given NVTX domain.
 
uint64_t id () const noexcept
 The registered time domain ID.
 
void set_timer_source (uint64_t flags, int64_t(*provider)()) noexcept
 Describe the timer source for this time domain.
 
void set_timer_source (uint64_t flags, int64_t(*provider)(void *), void *data) noexcept
 Describe the timer source with a user data pointer.
 
void sync_point (uint64_t other_id, int64_t ts_self, int64_t ts_other) noexcept
 Report one synchronization point to another time domain.
 
void sync_point_table (uint64_t other_id, nvtxSyncPoint_t const *points, size_t count) noexcept
 Report a table of synchronization points to another time domain.
 
void conversion_factor (uint64_t other_id, double slope, int64_t ts_self, int64_t ts_other) noexcept
 Report a conversion factor from this domain to another.
 

Detailed Description

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

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

Wraps nvtxTimeDomainRegister and the follow-up APIs that describe timer sources and report time synchronization between domains. Once constructed, the cached time domain ID can be passed to time_semantic::time_domain() or used directly with the C API.

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

Definition at line 4149 of file nvtx3.hpp.

Constructor & Destructor Documentation

◆ time_domain_in()

template<typename D = domain::global>
nvtx3::v1::mv2::time_domain_in< D >::time_domain_in ( uint64_t  timestamp_type_id,
detail::scope_type  s = detail::scope_type::none(),
uint64_t  timer_flags = 0,
int64_t  timer_resolution = 0,
uint64_t  timer_start = 0,
uint64_t  static_id = 0 
)
inlineexplicitnoexcept

Register a time domain in the given NVTX domain.

Parameters
timestamp_type_idA predefined NVTX_TIMESTAMP_TYPE_* value or 0 for tool-defined.
sScope in which the timestamps apply.
timer_flagsNVTX_TIMER_FLAG_* bits describing timer properties.
timer_resolutionTicks per second (0 means unknown).
timer_startOne of NVTX_TIMER_START_*.
static_idOptional static time domain ID, which must be in [NVTX_TIME_DOMAIN_ID_STATIC_START, NVTX_TIME_DOMAIN_ID_DYNAMIC_START). Defaults to 0, which lets the tool assign the ID.

Definition at line 4165 of file nvtx3.hpp.

Member Function Documentation

◆ conversion_factor()

template<typename D = domain::global>
void nvtx3::v1::mv2::time_domain_in< D >::conversion_factor ( uint64_t  other_id,
double  slope,
int64_t  ts_self,
int64_t  ts_other 
)
inlinenoexcept

Report a conversion factor from this domain to another.

Wraps nvtxTimestampConversionFactor.

Parameters
other_idTarget time domain ID.
slopeConversion factor (other-ticks / this-ticks).
ts_selfReference timestamp in this time domain.
ts_otherReference timestamp in the other time domain.

Definition at line 4290 of file nvtx3.hpp.

◆ id()

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

The registered time domain ID.

Definition at line 4193 of file nvtx3.hpp.

◆ set_timer_source() [1/2]

template<typename D = domain::global>
void nvtx3::v1::mv2::time_domain_in< D >::set_timer_source ( uint64_t  flags,
int64_t(*)()  provider 
)
inlinenoexcept

Describe the timer source for this time domain.

Wraps nvtxTimerSource.

Parameters
flagsProvider flags (e.g. whether the function is safe to call after process teardown).
providerPointer to a function that returns a timestamp.

Definition at line 4204 of file nvtx3.hpp.

◆ set_timer_source() [2/2]

template<typename D = domain::global>
void nvtx3::v1::mv2::time_domain_in< D >::set_timer_source ( uint64_t  flags,
int64_t(*)(void *)  provider,
void *  data 
)
inlinenoexcept

Describe the timer source with a user data pointer.

Wraps nvtxTimerSourceWithData.

Parameters
flagsProvider flags.
providerPointer to a function that returns a timestamp given data.
dataOpaque pointer passed through to provider.

Definition at line 4224 of file nvtx3.hpp.

◆ sync_point()

template<typename D = domain::global>
void nvtx3::v1::mv2::time_domain_in< D >::sync_point ( uint64_t  other_id,
int64_t  ts_self,
int64_t  ts_other 
)
inlinenoexcept

Report one synchronization point to another time domain.

Wraps nvtxTimeSyncPoint.

Parameters
other_idTarget time domain ID (a registered ID or a predefined NVTX_TIMESTAMP_TYPE_* when unambiguous).
ts_selfTimestamp in this time domain.
ts_otherTimestamp in the other time domain.

Definition at line 4247 of file nvtx3.hpp.

◆ sync_point_table()

template<typename D = domain::global>
void nvtx3::v1::mv2::time_domain_in< D >::sync_point_table ( uint64_t  other_id,
nvtxSyncPoint_t const *  points,
size_t  count 
)
inlinenoexcept

Report a table of synchronization points to another time domain.

Wraps nvtxTimeSyncPointTable.

Parameters
other_idTarget time domain ID.
pointsArray of nvtxSyncPoint_t pairs.
countNumber of entries in points.

Definition at line 4267 of file nvtx3.hpp.


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