NVTX C API Reference v3
NVIDIA Tools Extension Library
Loading...
Searching...
No Matches
nvToolsExt.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: Copyright (c) 2009-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 * Licensed under the Apache License v2.0 with LLVM Exceptions.
18 * See https://nvidia.github.io/NVTX/LICENSE.txt for license information.
19 */
20
24/* ========================================================================= */
164#if defined(NVTX_VERSION) && NVTX_VERSION < 3
165#error "Trying to #include NVTX version 3 in a source file where an older NVTX version has already been included. If you are not directly using NVTX (the NVIDIA Tools Extension library), you are getting this error because libraries you are using have included different versions of NVTX. Suggested solutions are: (1) reorder #includes so the newest NVTX version is included first, (2) avoid using the conflicting libraries in the same .c/.cpp file, or (3) update the library using the older NVTX version to use the newer version instead."
166#endif
167
168#if defined(NVTX_AS_SYSTEM_HEADER)
169#if defined(__clang__)
170#pragma clang system_header
171#elif defined(__GNUC__) || defined(__NVCOMPILER)
172#pragma GCC system_header
173#elif defined(_MSC_VER)
174#pragma system_header
175#endif
176#endif
177
178/* Header guard */
179#if !defined(NVTX_VERSION)
180#define NVTX_VERSION 3
181
182/* Platform-dependent defines:
183 *
184 * - NVTX_API - Calling conventions (only used on Windows, and only effects
185 * 32-bit x86 builds, i.e. callee pops stack instead of caller)
186 *
187 * - NVTX_DYNAMIC_EXPORT - Make function an exported entry point from a
188 * dynamic library or shared object.
189 *
190 * - NVTX_EXPORT_UNMANGLED_FUNCTION_NAME - When used inside the body of a
191 * function declared with NVTX_DYNAMIC_EXPORT, ensures the symbol exported
192 * for the function is the exact string of the function's name as written
193 * in the code. Name-mangling or name-decoration is disabled. Note that
194 * on many platforms this is not necessary, since either the function name
195 * is already exported verbatim, or the dynamic loader also checks for
196 * functions with the mangling applied. Forcing the exports to avoid any
197 * mangling simplifies usage across platforms and from other languages.
198 */
199#if defined(_WIN32)
200
201#define NVTX_API __stdcall
202
203#if defined(_MSC_VER)
204#define NVTX_DYNAMIC_EXPORT __declspec(dllexport)
205#else
206#define NVTX_DYNAMIC_EXPORT __attribute__((visibility("default"))) __declspec(dllexport)
207#endif
208
209#if defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_ARM64EC))
210#define NVTX_EXPORT_UNMANGLED_FUNCTION_NAME __pragma(comment(linker, "/EXPORT:" __FUNCTION__ "=" __FUNCDNAME__))
211#else
212#define NVTX_EXPORT_UNMANGLED_FUNCTION_NAME
213#endif
214
215#else /* POSIX-like platform */
216
217#define NVTX_API
218
219#define NVTX_DYNAMIC_EXPORT __attribute__((visibility("default")))
220
221#define NVTX_EXPORT_UNMANGLED_FUNCTION_NAME
222
223#endif /* Platform-dependent defines */
224
225/* Compiler-dependent defines:
226 *
227 * - NVTX_INLINE_STATIC - Ensure function has internal linkage, and suggest
228 * avoiding code-gen of the function. Without this, function has external
229 * linkage with a strong symbol, so linker expects only one definition.
230 */
231#if defined(_MSC_VER)
232
233#define NVTX_INLINE_STATIC __inline static
234
235#else /* GCC-like compiler */
236
237#if defined(__cplusplus) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
238#define NVTX_INLINE_STATIC inline static
239#else
240#define NVTX_INLINE_STATIC __inline__ static
241#endif
242
243#endif /* Compiler-dependent defines */
244
245#if !defined(NVTX_NULLPTR)
246#if defined(__cplusplus) && __cplusplus >= 201103L
247#define NVTX_NULLPTR nullptr
248#else
249#define NVTX_NULLPTR NULL
250#endif
251#endif
252
253#if defined(__cplusplus)
254#define NVTX_STATIC_CAST(type, value) (static_cast<type>(value))
255#define NVTX_REINTERPRET_CAST(type, value) (reinterpret_cast<type>(value))
256#else
257#define NVTX_STATIC_CAST(type, value) ((type)(value))
258#define NVTX_REINTERPRET_CAST(type, value) ((type)(value))
259#endif
260
261
262/* API linkage/export options:
263 *
264 * - By default, the NVTX API functions are declared as "inline", with the
265 * implementations provided in the headers. This allows multiple .c/.cpp
266 * files in the same project to include NVTX headers without duplicate-
267 * definition linker errors. An optimizing compiler should inline these
268 * implementations, ensuring that the overhead of making an NVTX call is as
269 * low as possible, even without enabling link-time optimizations.
270 *
271 * - NVTX_NO_IMPL - Use when writing NVTX tools. If this macro is defined,
272 * the NVTX headers will provide all the typedefs, macros, and declarations
273 * of API functions (not marked inline), but no function implementations.
274 *
275 * - NVTX_EXPORT_API - NVTX is normally used in C/C++ applications by simply
276 * including the headers. There is no need to link with a static library,
277 * or to ship a dynamic library with the application (this was changed in
278 * NVTX v3). For other languages, it's not convenient to use a header-only
279 * C library. The best way to provide an idiomatic NVTX API for another
280 * language is a .c file that includes the NVTX headers and implements
281 * functions for that language using its native calling conventions and
282 * datatypes -- this method can allow static linking to avoid depending on
283 * a separate dynamic library. Alternatively, other languages may support
284 * using C calling conventions to directly call C functions exported from a
285 * dynamic library. To build such a library, write a .c file that defines
286 * NVTX_EXPORT_API and includes any/all of the NVTX headers. Compile this
287 * file as a dynamic library, and the NVTX API functions from the included
288 * headers will be exported with no name-mangling or decoration. Defining
289 * ABI-compatible NVTX struct and enum types in the other language is the
290 * responsibility of the user of this dynamic library.
291 *
292 * Whichever of the above modes is chosen, the following macros are defined
293 * appropriately below to implement that mode. These macros are only defined
294 * if not already defined by the user, so they may be overridden by users to
295 * handle advanced cases.
296 *
297 * - NVTX_DECLSPEC - Specify linkage for NVTX API functions.
298 *
299 * - NVTX_SET_NAME_MANGLING_OPTIONS - If necessary for the platform, will use
300 * platform-dependent syntax for ensuring function name is exported with no
301 * name-mangling or decoration. Certain compiler and calling-convention
302 * combinations will add name-mangling or decorations when exporting NVTX
303 * function name symbols, which makes it much harder for other languages
304 * to access these functions. This macro must be used inside a function's
305 * body because it uses built-in macros to get the current function's name.
306 */
307#if defined(NVTX_NO_IMPL)
308
309/* When omitting implementation, avoid declaring functions inline
310 * without definitions, since this causes compiler warnings. */
311#if !defined(NVTX_DECLSPEC)
312#define NVTX_DECLSPEC
313#endif
314#if !defined(NVTX_SET_NAME_MANGLING_OPTIONS)
315#define NVTX_SET_NAME_MANGLING_OPTIONS
316#endif
317
318#elif defined(NVTX_EXPORT_API)
319
320/* Add platform-dependent declaration syntax to ensure NVTX API functions are
321 * exported when compiling as a dynamic library/shared object, and ensure the
322 * exported names are not mangled/decorated. */
323#if !defined(NVTX_DECLSPEC)
324#define NVTX_DECLSPEC NVTX_DYNAMIC_EXPORT
325#endif
326#if !defined(NVTX_SET_NAME_MANGLING_OPTIONS)
327#define NVTX_SET_NAME_MANGLING_OPTIONS NVTX_EXPORT_UNMANGLED_FUNCTION_NAME
328#endif
329
330#else /* Normal NVTX usage */
331
332/* Functions definitions are provided, and functions are declared inline to
333 * avoid duplicate-definition linker errors when using multiple source files. */
334#if !defined(NVTX_DECLSPEC)
335#define NVTX_DECLSPEC NVTX_INLINE_STATIC
336#endif
337#if !defined(NVTX_SET_NAME_MANGLING_OPTIONS)
338#define NVTX_SET_NAME_MANGLING_OPTIONS
339#endif
340
341#endif
342
343/* Platform-dependent helpers for defining global variables in header files.
344 * Ensures the linker uses only one instance when multiple source files include
345 * the headers, avoiding duplicate-definition linker errors. */
346#include "nvtxDetail/nvtxLinkOnce.h"
347
348/* Macros for applying major-version-specific suffix to NVTX global symbols, so
349 * usage of different versions in different source files is supported without
350 * violating the one-definition rule. */
351#define NVTX_VERSIONED_IDENTIFIER_L3(NAME, VERSION) NAME##_v##VERSION
352#define NVTX_VERSIONED_IDENTIFIER_L2(NAME, VERSION) NVTX_VERSIONED_IDENTIFIER_L3(NAME, VERSION)
353#define NVTX_VERSIONED_IDENTIFIER(NAME) NVTX_VERSIONED_IDENTIFIER_L2(NAME, NVTX_VERSION)
354
374#ifndef NVTX_STDINT_TYPES_ALREADY_DEFINED
375#include <stdint.h>
376#endif
377
378#include <stddef.h>
379
380#ifdef __cplusplus
381extern "C" {
382#endif /* __cplusplus */
383
387#define NVTX_SUCCESS 0
388#define NVTX_FAIL 1
389#define NVTX_ERR_INIT_LOAD_PROPERTY 2
390#define NVTX_ERR_INIT_ACCESS_LIBRARY 3
391#define NVTX_ERR_INIT_LOAD_LIBRARY 4
392#define NVTX_ERR_INIT_MISSING_LIBRARY_ENTRY_POINT 5
393#define NVTX_ERR_INIT_FAILED_LIBRARY_ENTRY_POINT 6
394#define NVTX_ERR_NO_INJECTION_LIBRARY_AVAILABLE 7
395
399#define NVTX_EVENT_ATTRIB_STRUCT_SIZE (NVTX_STATIC_CAST(uint16_t, sizeof(nvtxEventAttributes_t)))
400
401#define NVTX_NO_PUSH_POP_TRACKING (NVTX_STATIC_CAST(int, -2))
402
403typedef uint64_t nvtxRangeId_t;
404
405/* Forward declaration of opaque domain registration structure */
406struct nvtxDomainRegistration_st;
407typedef struct nvtxDomainRegistration_st nvtxDomainRegistration;
408
409/* \brief Domain Handle Structure.
410* \anchor DOMAIN_HANDLE_STRUCTURE
411*
412* This structure is opaque to the user and is used as a handle to reference
413* a domain. This type is returned from tools when using the NVTX API to
414* create a domain.
415*
416*/
417typedef nvtxDomainRegistration* nvtxDomainHandle_t;
418
419/* Forward declaration of opaque string registration structure */
420struct nvtxStringRegistration_st;
421typedef struct nvtxStringRegistration_st nvtxStringRegistration;
422
423/* \brief Registered String Handle Structure.
424* \anchor REGISTERED_STRING_HANDLE_STRUCTURE
425*
426* This structure is opaque to the user and is used as a handle to reference
427* a registered string. This type is returned from tools when using the NVTX
428* API to create a registered string.
429*
430*/
431typedef nvtxStringRegistration* nvtxStringHandle_t;
432
433/* ========================================================================= */
446
460
462{
463 const char* ascii;
464 const wchar_t* unicode;
465 /* NVTX_VERSION_2 */
466 nvtxStringHandle_t registered;
468
469
470/* ------------------------------------------------------------------------- */
493NVTX_DECLSPEC void NVTX_API nvtxInitialize(const void* reserved);
/*END defgroup*/
498
499/* ========================================================================= */
518
596{
604 uint16_t version;
605
612 uint16_t size;
613
625 uint32_t category;
626
634 int32_t colorType; /* nvtxColorType_t */
635
640 uint32_t color;
641
650 int32_t payloadType; /* nvtxPayloadType_t */
651
652 int32_t reserved0;
653
661 {
662 uint64_t ullValue;
663 int64_t llValue;
664 double dValue;
665 /* NVTX_VERSION_2 */
666 uint32_t uiValue;
667 int32_t iValue;
668 float fValue;
669 } payload;
670
678 int32_t messageType; /* nvtxMessageType_t */
679
685
687
688typedef struct nvtxEventAttributes_v2 nvtxEventAttributes_t;
689
/*END defgroup*/
691/* ========================================================================= */
701/* ------------------------------------------------------------------------- */
721NVTX_DECLSPEC void NVTX_API nvtxDomainMarkEx(nvtxDomainHandle_t domain, const nvtxEventAttributes_t* eventAttrib);
724/* ------------------------------------------------------------------------- */
758NVTX_DECLSPEC void NVTX_API nvtxMarkEx(const nvtxEventAttributes_t* eventAttrib);
761/* ------------------------------------------------------------------------- */
782NVTX_DECLSPEC void NVTX_API nvtxMarkA(const char* message);
783NVTX_DECLSPEC void NVTX_API nvtxMarkW(const wchar_t* message);
789/* ------------------------------------------------------------------------- */
819NVTX_DECLSPEC nvtxRangeId_t NVTX_API nvtxDomainRangeStartEx(nvtxDomainHandle_t domain, const nvtxEventAttributes_t* eventAttrib);
822/* ------------------------------------------------------------------------- */
854NVTX_DECLSPEC nvtxRangeId_t NVTX_API nvtxRangeStartEx(const nvtxEventAttributes_t* eventAttrib);
857/* ------------------------------------------------------------------------- */
882NVTX_DECLSPEC nvtxRangeId_t NVTX_API nvtxRangeStartA(const char* message);
883NVTX_DECLSPEC nvtxRangeId_t NVTX_API nvtxRangeStartW(const wchar_t* message);
886/* ------------------------------------------------------------------------- */
914NVTX_DECLSPEC void NVTX_API nvtxDomainRangeEnd(nvtxDomainHandle_t domain, nvtxRangeId_t id);
917/* ------------------------------------------------------------------------- */
930NVTX_DECLSPEC void NVTX_API nvtxRangeEnd(nvtxRangeId_t id);
935/* ------------------------------------------------------------------------- */
972NVTX_DECLSPEC int NVTX_API nvtxDomainRangePushEx(nvtxDomainHandle_t domain, const nvtxEventAttributes_t* eventAttrib);
975/* ------------------------------------------------------------------------- */
1011NVTX_DECLSPEC int NVTX_API nvtxRangePushEx(const nvtxEventAttributes_t* eventAttrib);
1014/* ------------------------------------------------------------------------- */
1037NVTX_DECLSPEC int NVTX_API nvtxRangePushA(const char* message);
1038NVTX_DECLSPEC int NVTX_API nvtxRangePushW(const wchar_t* message);
1042/* ------------------------------------------------------------------------- */
1077NVTX_DECLSPEC int NVTX_API nvtxDomainRangePop(nvtxDomainHandle_t domain);
1080/* ------------------------------------------------------------------------- */
1102NVTX_DECLSPEC int NVTX_API nvtxRangePop(void);
/*END defgroup*/
1107/* ========================================================================= */
1116/* ------------------------------------------------------------------------- */
1118/* ------------------------------------------------------------------------- */
1119
1120/* ------------------------------------------------------------------------- */
1127#define NVTX_RESOURCE_MAKE_TYPE(CLASS, INDEX) (((NVTX_STATIC_CAST(uint32_t, NVTX_RESOURCE_CLASS_ ## CLASS))<<16)|(NVTX_STATIC_CAST(uint32_t, INDEX)))
1128#define NVTX_RESOURCE_CLASS_GENERIC 1
1131/* ------------------------------------------------------------------------- */
1140{
1141 NVTX_RESOURCE_TYPE_UNKNOWN = 0,
1142 NVTX_RESOURCE_TYPE_GENERIC_POINTER = NVTX_RESOURCE_MAKE_TYPE(GENERIC, 1),
1143 NVTX_RESOURCE_TYPE_GENERIC_HANDLE = NVTX_RESOURCE_MAKE_TYPE(GENERIC, 2),
1144 NVTX_RESOURCE_TYPE_GENERIC_THREAD_NATIVE = NVTX_RESOURCE_MAKE_TYPE(GENERIC, 3),
1145 NVTX_RESOURCE_TYPE_GENERIC_THREAD_POSIX = NVTX_RESOURCE_MAKE_TYPE(GENERIC, 4)
1147
1148
1149
1225{
1233 uint16_t version;
1234
1241 uint16_t size;
1242
1251 int32_t identifierType; /* values from enums following the pattern nvtxResource[name]Type_t */
1252
1261 {
1262 const void* pValue;
1263 uint64_t ullValue;
1264 } identifier;
1265
1273 int32_t messageType; /* nvtxMessageType_t */
1274
1280
1282
1283typedef struct nvtxResourceAttributes_v0 nvtxResourceAttributes_t;
1284
1285/* \cond SHOW_HIDDEN
1286* \version NVTX_VERSION_2
1287*/
1288#define NVTX_RESOURCE_ATTRIB_STRUCT_SIZE (NVTX_STATIC_CAST(uint16_t, sizeof(nvtxResourceAttributes_v0)))
1289typedef struct nvtxResourceHandle* nvtxResourceHandle_t;
1294/* ------------------------------------------------------------------------- */
1325NVTX_DECLSPEC nvtxResourceHandle_t NVTX_API nvtxDomainResourceCreate(nvtxDomainHandle_t domain, nvtxResourceAttributes_t* attribs);
1328/* ------------------------------------------------------------------------- */
1356NVTX_DECLSPEC void NVTX_API nvtxDomainResourceDestroy(nvtxResourceHandle_t resource);
1362/* ------------------------------------------------------------------------- */
1391NVTX_DECLSPEC void NVTX_API nvtxDomainNameCategoryA(nvtxDomainHandle_t domain, uint32_t category, const char* name);
1392NVTX_DECLSPEC void NVTX_API nvtxDomainNameCategoryW(nvtxDomainHandle_t domain, uint32_t category, const wchar_t* name);
1417NVTX_DECLSPEC void NVTX_API nvtxNameCategoryA(uint32_t category, const char* name);
1418NVTX_DECLSPEC void NVTX_API nvtxNameCategoryW(uint32_t category, const wchar_t* name);
1423/* ------------------------------------------------------------------------- */
1486NVTX_DECLSPEC void NVTX_API nvtxNameOsThreadA(uint32_t threadId, const char* name);
1487NVTX_DECLSPEC void NVTX_API nvtxNameOsThreadW(uint32_t threadId, const wchar_t* name);
/*END defgroup*/
1492/* ========================================================================= */
1504/* ------------------------------------------------------------------------- */
1536NVTX_DECLSPEC nvtxStringHandle_t NVTX_API nvtxDomainRegisterStringA(nvtxDomainHandle_t domain, const char* string);
1537NVTX_DECLSPEC nvtxStringHandle_t NVTX_API nvtxDomainRegisterStringW(nvtxDomainHandle_t domain, const wchar_t* string);
/*END defgroup*/
1541/* ========================================================================= */
1560/* ------------------------------------------------------------------------- */
1600NVTX_DECLSPEC nvtxDomainHandle_t NVTX_API nvtxDomainCreateA(const char* name);
1601NVTX_DECLSPEC nvtxDomainHandle_t NVTX_API nvtxDomainCreateW(const wchar_t* name);
1604/* ------------------------------------------------------------------------- */
1625NVTX_DECLSPEC void NVTX_API nvtxDomainDestroy(nvtxDomainHandle_t domain);
/*END defgroup*/
1630/* ========================================================================= */
1633#ifdef UNICODE
1634 #define nvtxMark nvtxMarkW
1635 #define nvtxRangeStart nvtxRangeStartW
1636 #define nvtxRangePush nvtxRangePushW
1637 #define nvtxNameCategory nvtxNameCategoryW
1638 #define nvtxNameOsThread nvtxNameOsThreadW
1639 /* NVTX_VERSION_2 */
1640 #define nvtxDomainCreate nvtxDomainCreateW
1641 #define nvtxDomainRegisterString nvtxDomainRegisterStringW
1642 #define nvtxDomainNameCategory nvtxDomainNameCategoryW
1643#else
1644 #define nvtxMark nvtxMarkA
1645 #define nvtxRangeStart nvtxRangeStartA
1646 #define nvtxRangePush nvtxRangePushA
1647 #define nvtxNameCategory nvtxNameCategoryA
1648 #define nvtxNameOsThread nvtxNameOsThreadA
1649 /* NVTX_VERSION_2 */
1650 #define nvtxDomainCreate nvtxDomainCreateA
1651 #define nvtxDomainRegisterString nvtxDomainRegisterStringA
1652 #define nvtxDomainNameCategory nvtxDomainNameCategoryA
1653#endif
1654
1657#ifdef __cplusplus
1658} /* extern "C" */
1659#endif /* __cplusplus */
1660
1661#define NVTX_IMPL_GUARD /* Ensure other headers cannot be included directly */
1662
1663#include "nvtxDetail/nvtxTypes.h"
1664
1665#ifndef NVTX_NO_IMPL
1666#include "nvtxDetail/nvtxImpl.h"
1667#endif /*NVTX_NO_IMPL*/
1668
1669#undef NVTX_IMPL_GUARD
1670
1671#endif /* !defined(NVTX_VERSION) */
NVTX_DECLSPEC nvtxDomainHandle_t NVTX_API nvtxDomainCreateA(const char *name)
Register a NVTX domain.
NVTX_DECLSPEC void NVTX_API nvtxDomainDestroy(nvtxDomainHandle_t domain)
Unregister a NVTX domain.
nvtxPayloadType_t
Definition nvToolsExt.h:508
@ NVTX_PAYLOAD_TYPE_INT32
Definition nvToolsExt.h:515
@ NVTX_PAYLOAD_TYPE_DOUBLE
Definition nvToolsExt.h:512
@ NVTX_PAYLOAD_UNKNOWN
Definition nvToolsExt.h:509
@ NVTX_PAYLOAD_TYPE_UNSIGNED_INT32
Definition nvToolsExt.h:514
@ NVTX_PAYLOAD_TYPE_FLOAT
Definition nvToolsExt.h:516
@ NVTX_PAYLOAD_TYPE_INT64
Definition nvToolsExt.h:511
@ NVTX_PAYLOAD_TYPE_UNSIGNED_INT64
Definition nvToolsExt.h:510
NVTX_DECLSPEC void NVTX_API nvtxInitialize(const void *reserved)
Force initialization (optional) .
nvtxColorType_t
Definition nvToolsExt.h:442
nvtxMessageType_t
Definition nvToolsExt.h:451
@ NVTX_COLOR_ARGB
Definition nvToolsExt.h:444
@ NVTX_COLOR_UNKNOWN
Definition nvToolsExt.h:443
@ NVTX_MESSAGE_TYPE_REGISTERED
Definition nvToolsExt.h:456
@ NVTX_MESSAGE_TYPE_UNICODE
Definition nvToolsExt.h:454
@ NVTX_MESSAGE_TYPE_ASCII
Definition nvToolsExt.h:453
@ NVTX_MESSAGE_UNKNOWN
Definition nvToolsExt.h:452
NVTX_DECLSPEC int NVTX_API nvtxDomainRangePop(nvtxDomainHandle_t domain)
Ends a nested thread range.
NVTX_DECLSPEC void NVTX_API nvtxDomainRangeEnd(nvtxDomainHandle_t domain, nvtxRangeId_t id)
Ends a process range.
NVTX_DECLSPEC nvtxRangeId_t NVTX_API nvtxRangeStartA(const char *message)
Starts a process range.
NVTX_DECLSPEC int NVTX_API nvtxRangePop(void)
Ends a nested thread range.
NVTX_DECLSPEC int NVTX_API nvtxDomainRangePushEx(nvtxDomainHandle_t domain, const nvtxEventAttributes_t *eventAttrib)
Starts a nested thread range.
NVTX_DECLSPEC void NVTX_API nvtxRangeEnd(nvtxRangeId_t id)
Ends a process range.
NVTX_DECLSPEC int NVTX_API nvtxRangePushA(const char *message)
Starts a nested thread range.
NVTX_DECLSPEC void NVTX_API nvtxDomainMarkEx(nvtxDomainHandle_t domain, const nvtxEventAttributes_t *eventAttrib)
Marks an instantaneous event in the application.
NVTX_DECLSPEC void NVTX_API nvtxMarkEx(const nvtxEventAttributes_t *eventAttrib)
Marks an instantaneous event in the application.
NVTX_DECLSPEC void NVTX_API nvtxMarkA(const char *message)
Marks an instantaneous event in the application.
NVTX_DECLSPEC int NVTX_API nvtxRangePushEx(const nvtxEventAttributes_t *eventAttrib)
Starts a nested thread range.
NVTX_DECLSPEC nvtxRangeId_t NVTX_API nvtxRangeStartEx(const nvtxEventAttributes_t *eventAttrib)
Starts a process range.
NVTX_DECLSPEC nvtxRangeId_t NVTX_API nvtxDomainRangeStartEx(nvtxDomainHandle_t domain, const nvtxEventAttributes_t *eventAttrib)
Starts a process range in a domain.
NVTX_DECLSPEC nvtxResourceHandle_t NVTX_API nvtxDomainResourceCreate(nvtxDomainHandle_t domain, nvtxResourceAttributes_t *attribs)
Create a resource object to track and associate data with OS and middleware objects.
NVTX_DECLSPEC void NVTX_API nvtxNameCategoryA(uint32_t category, const char *name)
Annotate an NVTX category.
NVTX_DECLSPEC void NVTX_API nvtxDomainResourceDestroy(nvtxResourceHandle_t resource)
Destroy a resource object to track and associate data with OS and middleware objects.
nvtxResourceGenericType_t
Generic resource type for when a resource class is not available.
NVTX_DECLSPEC void NVTX_API nvtxNameOsThreadA(uint32_t threadId, const char *name)
Annotate an OS thread.
NVTX_DECLSPEC void NVTX_API nvtxDomainNameCategoryA(nvtxDomainHandle_t domain, uint32_t category, const char *name)
Annotate an NVTX category used within a domain.
@ NVTX_RESOURCE_TYPE_GENERIC_THREAD_POSIX
@ NVTX_RESOURCE_TYPE_GENERIC_HANDLE
@ NVTX_RESOURCE_TYPE_GENERIC_POINTER
@ NVTX_RESOURCE_TYPE_GENERIC_THREAD_NATIVE
NVTX_DECLSPEC nvtxStringHandle_t NVTX_API nvtxDomainRegisterStringA(nvtxDomainHandle_t domain, const char *string)
Register a string.
Event Attribute Structure. .
Definition nvToolsExt.h:596
uint16_t version
Version flag of the structure.
Definition nvToolsExt.h:604
int32_t colorType
Color type specified in this attribute structure.
Definition nvToolsExt.h:634
uint16_t size
Size of the structure.
Definition nvToolsExt.h:612
int32_t payloadType
Payload type specified in this attribute structure.
Definition nvToolsExt.h:650
nvtxMessageValue_t message
Message assigned to this attribute structure..
Definition nvToolsExt.h:684
int32_t messageType
Message type specified in this attribute structure.
Definition nvToolsExt.h:678
uint32_t color
Color assigned to this event..
Definition nvToolsExt.h:640
uint32_t category
ID of the category the event is assigned to.
Definition nvToolsExt.h:625
Resource Attribute Structure. .
int32_t messageType
Message type specified in this attribute structure.
uint16_t size
Size of the structure.
uint16_t version
Version flag of the structure.
nvtxMessageValue_t message
Message assigned to this attribute structure..
int32_t identifierType
Identifier type specifies how to interpret the identifier field.
Payload assigned to this event..
Definition nvToolsExt.h:661
Identifier for the resource. .