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-2025 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/* ========================================================================= */
161#if defined(NVTX_VERSION) && NVTX_VERSION < 3
162#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."
163#endif
164
165/* Header guard */
166#if !defined(NVTX_VERSION)
167#define NVTX_VERSION 3
168
169/* Platform-dependent defines:
170 *
171 * - NVTX_API - Calling conventions (only used on Windows, and only effects
172 * 32-bit x86 builds, i.e. callee pops stack instead of caller)
173 *
174 * - NVTX_DYNAMIC_EXPORT - Make function an exported entry point from a
175 * dynamic library or shared object.
176 *
177 * - NVTX_EXPORT_UNMANGLED_FUNCTION_NAME - When used inside the body of a
178 * function declared with NVTX_DYNAMIC_EXPORT, ensures the symbol exported
179 * for the function is the exact string of the function's name as written
180 * in the code. Name-mangling or name-decoration is disabled. Note that
181 * on many platforms this is not necessary, since either the function name
182 * is already exported verbatim, or the dynamic loader also checks for
183 * functions with the mangling applied. Forcing the exports to avoid any
184 * mangling simplifies usage across platforms and from other languages.
185 */
186#if defined(_WIN32)
187
188#define NVTX_API __stdcall
189
190#if defined(_MSC_VER)
191#define NVTX_DYNAMIC_EXPORT __declspec(dllexport)
192#else
193#define NVTX_DYNAMIC_EXPORT __attribute__((visibility("default"))) __declspec(dllexport)
194#endif
195
196#if defined(_M_IX86) || defined(_M_ARM64EC)
197#define NVTX_EXPORT_UNMANGLED_FUNCTION_NAME _Pragma("comment(linker, \"/EXPORT:\" __FUNCTION__ \"=\" __FUNCDNAME__)")
198#else
199#define NVTX_EXPORT_UNMANGLED_FUNCTION_NAME
200#endif
201
202#else /* POSIX-like platform */
203
204#define NVTX_API
205
206#define NVTX_DYNAMIC_EXPORT __attribute__((visibility("default")))
207
208#define NVTX_EXPORT_UNMANGLED_FUNCTION_NAME
209
210#endif /* Platform-dependent defines */
211
212/* Compiler-dependent defines:
213 *
214 * - NVTX_INLINE_STATIC - Ensure function has internal linkage, and suggest
215 * avoiding code-gen of the function. Without this, function has external
216 * linkage with a strong symbol, so linker expects only one definition.
217 */
218#if defined(_MSC_VER)
219
220#define NVTX_INLINE_STATIC __inline static
221
222#else /* GCC-like compiler */
223
224#if defined(__cplusplus) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
225#define NVTX_INLINE_STATIC inline static
226#else
227#define NVTX_INLINE_STATIC __inline__ static
228#endif
229
230#endif /* Compiler-dependent defines */
231
232
233/* API linkage/export options:
234 *
235 * - By default, the NVTX API functions are declared as "inline", with the
236 * implementations provided in the headers. This allows multiple .c/.cpp
237 * files in the same project to include NVTX headers without duplicate-
238 * definition linker errors. An optimizing compiler should inline these
239 * implementations, ensuring that the overhead of making an NVTX call is as
240 * low as possible, even without enabling link-time optimizations.
241 *
242 * - NVTX_NO_IMPL - Use when writing NVTX tools. If this macro is defined,
243 * the NVTX headers will provide all the typedefs, macros, and declarations
244 * of API functions (not marked inline), but no function implementations.
245 *
246 * - NVTX_EXPORT_API - NVTX is normally used in C/C++ applications by simply
247 * including the headers. There is no need to link with a static library,
248 * or to ship a dynamic library with the application (this was changed in
249 * NVTX v3). For other languages, it's not convenient to use a header-only
250 * C library. The best way to provide an idiomatic NVTX API for another
251 * language is a .c file that includes the NVTX headers and implements
252 * functions for that language using its native calling conventions and
253 * datatypes -- this method can allow static linking to avoid depending on
254 * a separate dynamic library. Alternatively, other languages may support
255 * using C calling conventions to directly call C functions exported from a
256 * dynamic library. To build such a library, write a .c file that defines
257 * NVTX_EXPORT_API and includes any/all of the NVTX headers. Compile this
258 * file as a dynamic library, and the NVTX API functions from the included
259 * headers will be exported with no name-mangling or decoration. Defining
260 * ABI-compatible NVTX struct and enum types in the other language is the
261 * responsibility of the user of this dynamic library.
262 *
263 * Whichever of the above modes is chosen, the following macros are defined
264 * appropriately below to implement that mode. These macros are only defined
265 * if not already defined by the user, so they may be overridden by users to
266 * handle advanced cases.
267 *
268 * - NVTX_DECLSPEC - Specify linkage for NVTX API functions.
269 *
270 * - NVTX_SET_NAME_MANGLING_OPTIONS - If necessary for the platform, will use
271 * platform-dependent syntax for ensuring function name is exported with no
272 * name-mangling or decoration. Certain compiler and calling-convention
273 * combinations will add name-mangling or decorations when exporting NVTX
274 * function name symbols, which makes it much harder for other languages
275 * to access these functions. This macro must be used inside a function's
276 * body because it uses built-in macros to get the current function's name.
277 */
278#if defined(NVTX_NO_IMPL)
279
280/* When omitting implementation, avoid declaring functions inline
281 * without definitions, since this causes compiler warnings. */
282#if !defined(NVTX_DECLSPEC)
283#define NVTX_DECLSPEC
284#endif
285#if !defined(NVTX_SET_NAME_MANGLING_OPTIONS)
286#define NVTX_SET_NAME_MANGLING_OPTIONS
287#endif
288
289#elif defined(NVTX_EXPORT_API)
290
291/* Add platform-dependent declaration syntax to ensure NVTX API functions are
292 * exported when compiling as a dynamic library/shared object, and ensure the
293 * exported names are not mangled/decorated. */
294#if !defined(NVTX_DECLSPEC)
295#define NVTX_DECLSPEC NVTX_DYNAMIC_EXPORT
296#endif
297#if !defined(NVTX_SET_NAME_MANGLING_OPTIONS)
298#define NVTX_SET_NAME_MANGLING_OPTIONS NVTX_EXPORT_UNMANGLED_FUNCTION_NAME
299#endif
300
301#else /* Normal NVTX usage */
302
303/* Functions definitions are provided, and functions are declared inline to
304 * avoid duplicate-definition linker errors when using multiple source files. */
305#if !defined(NVTX_DECLSPEC)
306#define NVTX_DECLSPEC NVTX_INLINE_STATIC
307#endif
308#if !defined(NVTX_SET_NAME_MANGLING_OPTIONS)
309#define NVTX_SET_NAME_MANGLING_OPTIONS
310#endif
311
312#endif
313
314/* Platform-dependent helpers for defining global variables in header files.
315 * Ensures the linker uses only one instance when multiple source files include
316 * the headers, avoiding duplicate-definition linker errors. */
317#include "nvtxDetail/nvtxLinkOnce.h"
318
319/* Macros for applying major-version-specific suffix to NVTX global symbols, so
320 * usage of different versions in different source files is supported without
321 * violating the one-definition rule. */
322#define NVTX_VERSIONED_IDENTIFIER_L3(NAME, VERSION) NAME##_v##VERSION
323#define NVTX_VERSIONED_IDENTIFIER_L2(NAME, VERSION) NVTX_VERSIONED_IDENTIFIER_L3(NAME, VERSION)
324#define NVTX_VERSIONED_IDENTIFIER(NAME) NVTX_VERSIONED_IDENTIFIER_L2(NAME, NVTX_VERSION)
325
345#ifndef NVTX_STDINT_TYPES_ALREADY_DEFINED
346#include <stdint.h>
347#endif
348
349#include <stddef.h>
350
351#ifdef __cplusplus
352extern "C" {
353#endif /* __cplusplus */
354
358#define NVTX_SUCCESS 0
359#define NVTX_FAIL 1
360#define NVTX_ERR_INIT_LOAD_PROPERTY 2
361#define NVTX_ERR_INIT_ACCESS_LIBRARY 3
362#define NVTX_ERR_INIT_LOAD_LIBRARY 4
363#define NVTX_ERR_INIT_MISSING_LIBRARY_ENTRY_POINT 5
364#define NVTX_ERR_INIT_FAILED_LIBRARY_ENTRY_POINT 6
365#define NVTX_ERR_NO_INJECTION_LIBRARY_AVAILABLE 7
366
370#define NVTX_EVENT_ATTRIB_STRUCT_SIZE ( (uint16_t)( sizeof(nvtxEventAttributes_t) ) )
371
372#define NVTX_NO_PUSH_POP_TRACKING ((int)-2)
373
374typedef uint64_t nvtxRangeId_t;
375
376/* Forward declaration of opaque domain registration structure */
377struct nvtxDomainRegistration_st;
378typedef struct nvtxDomainRegistration_st nvtxDomainRegistration;
379
380/* \brief Domain Handle Structure.
381* \anchor DOMAIN_HANDLE_STRUCTURE
382*
383* This structure is opaque to the user and is used as a handle to reference
384* a domain. This type is returned from tools when using the NVTX API to
385* create a domain.
386*
387*/
388typedef nvtxDomainRegistration* nvtxDomainHandle_t;
389
390/* Forward declaration of opaque string registration structure */
391struct nvtxStringRegistration_st;
392typedef struct nvtxStringRegistration_st nvtxStringRegistration;
393
394/* \brief Registered String Handle Structure.
395* \anchor REGISTERED_STRING_HANDLE_STRUCTURE
396*
397* This structure is opaque to the user and is used as a handle to reference
398* a registered string. This type is returned from tools when using the NVTX
399* API to create a registered string.
400*
401*/
402typedef nvtxStringRegistration* nvtxStringHandle_t;
403
404/* ========================================================================= */
417
431
433{
434 const char* ascii;
435 const wchar_t* unicode;
436 /* NVTX_VERSION_2 */
437 nvtxStringHandle_t registered;
439
440
/*END defgroup*/
442/* ------------------------------------------------------------------------- */
464NVTX_DECLSPEC void NVTX_API nvtxInitialize(const void* reserved);
/*END defgroup*/
469
470/* ========================================================================= */
489
568{
576 uint16_t version;
577
584 uint16_t size;
585
597 uint32_t category;
598
606 int32_t colorType; /* nvtxColorType_t */
607
612 uint32_t color;
613
622 int32_t payloadType; /* nvtxPayloadType_t */
623
624 int32_t reserved0;
625
633 {
634 uint64_t ullValue;
635 int64_t llValue;
636 double dValue;
637 /* NVTX_VERSION_2 */
638 uint32_t uiValue;
639 int32_t iValue;
640 float fValue;
641 } payload;
642
650 int32_t messageType; /* nvtxMessageType_t */
651
657
659
660typedef struct nvtxEventAttributes_v2 nvtxEventAttributes_t;
661
/*END defgroup*/
663/* ========================================================================= */
673/* ------------------------------------------------------------------------- */
693NVTX_DECLSPEC void NVTX_API nvtxDomainMarkEx(nvtxDomainHandle_t domain, const nvtxEventAttributes_t* eventAttrib);
696/* ------------------------------------------------------------------------- */
729NVTX_DECLSPEC void NVTX_API nvtxMarkEx(const nvtxEventAttributes_t* eventAttrib);
732/* ------------------------------------------------------------------------- */
752NVTX_DECLSPEC void NVTX_API nvtxMarkA(const char* message);
753NVTX_DECLSPEC void NVTX_API nvtxMarkW(const wchar_t* message);
759/* ------------------------------------------------------------------------- */
788NVTX_DECLSPEC nvtxRangeId_t NVTX_API nvtxDomainRangeStartEx(nvtxDomainHandle_t domain, const nvtxEventAttributes_t* eventAttrib);
791/* ------------------------------------------------------------------------- */
822NVTX_DECLSPEC nvtxRangeId_t NVTX_API nvtxRangeStartEx(const nvtxEventAttributes_t* eventAttrib);
825/* ------------------------------------------------------------------------- */
849NVTX_DECLSPEC nvtxRangeId_t NVTX_API nvtxRangeStartA(const char* message);
850NVTX_DECLSPEC nvtxRangeId_t NVTX_API nvtxRangeStartW(const wchar_t* message);
853/* ------------------------------------------------------------------------- */
880NVTX_DECLSPEC void NVTX_API nvtxDomainRangeEnd(nvtxDomainHandle_t domain, nvtxRangeId_t id);
883/* ------------------------------------------------------------------------- */
896NVTX_DECLSPEC void NVTX_API nvtxRangeEnd(nvtxRangeId_t id);
901/* ------------------------------------------------------------------------- */
937NVTX_DECLSPEC int NVTX_API nvtxDomainRangePushEx(nvtxDomainHandle_t domain, const nvtxEventAttributes_t* eventAttrib);
940/* ------------------------------------------------------------------------- */
975NVTX_DECLSPEC int NVTX_API nvtxRangePushEx(const nvtxEventAttributes_t* eventAttrib);
978/* ------------------------------------------------------------------------- */
1000NVTX_DECLSPEC int NVTX_API nvtxRangePushA(const char* message);
1001NVTX_DECLSPEC int NVTX_API nvtxRangePushW(const wchar_t* message);
1005/* ------------------------------------------------------------------------- */
1039NVTX_DECLSPEC int NVTX_API nvtxDomainRangePop(nvtxDomainHandle_t domain);
1042/* ------------------------------------------------------------------------- */
1063NVTX_DECLSPEC int NVTX_API nvtxRangePop(void);
/*END defgroup*/
1068/* ========================================================================= */
1077/* ------------------------------------------------------------------------- */
1079/* ------------------------------------------------------------------------- */
1080
1081/* ------------------------------------------------------------------------- */
1088#define NVTX_RESOURCE_MAKE_TYPE(CLASS, INDEX) ((((uint32_t)(NVTX_RESOURCE_CLASS_ ## CLASS))<<16)|((uint32_t)(INDEX)))
1089#define NVTX_RESOURCE_CLASS_GENERIC 1
1092/* ------------------------------------------------------------------------- */
1101{
1102 NVTX_RESOURCE_TYPE_UNKNOWN = 0,
1103 NVTX_RESOURCE_TYPE_GENERIC_POINTER = NVTX_RESOURCE_MAKE_TYPE(GENERIC, 1),
1104 NVTX_RESOURCE_TYPE_GENERIC_HANDLE = NVTX_RESOURCE_MAKE_TYPE(GENERIC, 2),
1105 NVTX_RESOURCE_TYPE_GENERIC_THREAD_NATIVE = NVTX_RESOURCE_MAKE_TYPE(GENERIC, 3),
1106 NVTX_RESOURCE_TYPE_GENERIC_THREAD_POSIX = NVTX_RESOURCE_MAKE_TYPE(GENERIC, 4)
1108
1109
1110
1187{
1195 uint16_t version;
1196
1203 uint16_t size;
1204
1213 int32_t identifierType; /* values from enums following the pattern nvtxResource[name]Type_t */
1214
1223 {
1224 const void* pValue;
1225 uint64_t ullValue;
1226 } identifier;
1227
1235 int32_t messageType; /* nvtxMessageType_t */
1236
1242
1244
1245typedef struct nvtxResourceAttributes_v0 nvtxResourceAttributes_t;
1246
1247/* \cond SHOW_HIDDEN
1248* \version \NVTX_VERSION_2
1249*/
1250#define NVTX_RESOURCE_ATTRIB_STRUCT_SIZE ( (uint16_t)( sizeof(nvtxResourceAttributes_v0) ) )
1251typedef struct nvtxResourceHandle* nvtxResourceHandle_t;
1256/* ------------------------------------------------------------------------- */
1286NVTX_DECLSPEC nvtxResourceHandle_t NVTX_API nvtxDomainResourceCreate(nvtxDomainHandle_t domain, nvtxResourceAttributes_t* attribs);
1289/* ------------------------------------------------------------------------- */
1316NVTX_DECLSPEC void NVTX_API nvtxDomainResourceDestroy(nvtxResourceHandle_t resource);
1322/* ------------------------------------------------------------------------- */
1350NVTX_DECLSPEC void NVTX_API nvtxDomainNameCategoryA(nvtxDomainHandle_t domain, uint32_t category, const char* name);
1351NVTX_DECLSPEC void NVTX_API nvtxDomainNameCategoryW(nvtxDomainHandle_t domain, uint32_t category, const wchar_t* name);
1375NVTX_DECLSPEC void NVTX_API nvtxNameCategoryA(uint32_t category, const char* name);
1376NVTX_DECLSPEC void NVTX_API nvtxNameCategoryW(uint32_t category, const wchar_t* name);
1381/* ------------------------------------------------------------------------- */
1442NVTX_DECLSPEC void NVTX_API nvtxNameOsThreadA(uint32_t threadId, const char* name);
1443NVTX_DECLSPEC void NVTX_API nvtxNameOsThreadW(uint32_t threadId, const wchar_t* name);
/*END defgroup*/
1448/* ========================================================================= */
1460/* ------------------------------------------------------------------------- */
1491NVTX_DECLSPEC nvtxStringHandle_t NVTX_API nvtxDomainRegisterStringA(nvtxDomainHandle_t domain, const char* string);
1492NVTX_DECLSPEC nvtxStringHandle_t NVTX_API nvtxDomainRegisterStringW(nvtxDomainHandle_t domain, const wchar_t* string);
/*END defgroup*/
1496/* ========================================================================= */
1515/* ------------------------------------------------------------------------- */
1554NVTX_DECLSPEC nvtxDomainHandle_t NVTX_API nvtxDomainCreateA(const char* name);
1555NVTX_DECLSPEC nvtxDomainHandle_t NVTX_API nvtxDomainCreateW(const wchar_t* name);
1558/* ------------------------------------------------------------------------- */
1578NVTX_DECLSPEC void NVTX_API nvtxDomainDestroy(nvtxDomainHandle_t domain);
/*END defgroup*/
1583/* ========================================================================= */
1586#ifdef UNICODE
1587 #define nvtxMark nvtxMarkW
1588 #define nvtxRangeStart nvtxRangeStartW
1589 #define nvtxRangePush nvtxRangePushW
1590 #define nvtxNameCategory nvtxNameCategoryW
1591 #define nvtxNameOsThread nvtxNameOsThreadW
1592 /* NVTX_VERSION_2 */
1593 #define nvtxDomainCreate nvtxDomainCreateW
1594 #define nvtxDomainRegisterString nvtxDomainRegisterStringW
1595 #define nvtxDomainNameCategory nvtxDomainNameCategoryW
1596#else
1597 #define nvtxMark nvtxMarkA
1598 #define nvtxRangeStart nvtxRangeStartA
1599 #define nvtxRangePush nvtxRangePushA
1600 #define nvtxNameCategory nvtxNameCategoryA
1601 #define nvtxNameOsThread nvtxNameOsThreadA
1602 /* NVTX_VERSION_2 */
1603 #define nvtxDomainCreate nvtxDomainCreateA
1604 #define nvtxDomainRegisterString nvtxDomainRegisterStringA
1605 #define nvtxDomainNameCategory nvtxDomainNameCategoryA
1606#endif
1607
1610#ifdef __cplusplus
1611} /* extern "C" */
1612#endif /* __cplusplus */
1613
1614#define NVTX_IMPL_GUARD /* Ensure other headers cannot be included directly */
1615
1616#include "nvtxDetail/nvtxTypes.h"
1617
1618#ifndef NVTX_NO_IMPL
1619#include "nvtxDetail/nvtxImpl.h"
1620#endif /*NVTX_NO_IMPL*/
1621
1622#undef NVTX_IMPL_GUARD
1623
1624#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:479
@ NVTX_PAYLOAD_TYPE_INT32
Definition nvToolsExt.h:486
@ NVTX_PAYLOAD_TYPE_DOUBLE
Definition nvToolsExt.h:483
@ NVTX_PAYLOAD_UNKNOWN
Definition nvToolsExt.h:480
@ NVTX_PAYLOAD_TYPE_UNSIGNED_INT32
Definition nvToolsExt.h:485
@ NVTX_PAYLOAD_TYPE_FLOAT
Definition nvToolsExt.h:487
@ NVTX_PAYLOAD_TYPE_INT64
Definition nvToolsExt.h:482
@ NVTX_PAYLOAD_TYPE_UNSIGNED_INT64
Definition nvToolsExt.h:481
nvtxColorType_t
Definition nvToolsExt.h:413
nvtxMessageType_t
Definition nvToolsExt.h:422
@ NVTX_COLOR_ARGB
Definition nvToolsExt.h:415
@ NVTX_COLOR_UNKNOWN
Definition nvToolsExt.h:414
@ NVTX_MESSAGE_TYPE_REGISTERED
Definition nvToolsExt.h:427
@ NVTX_MESSAGE_TYPE_UNICODE
Definition nvToolsExt.h:425
@ NVTX_MESSAGE_TYPE_ASCII
Definition nvToolsExt.h:424
@ NVTX_MESSAGE_UNKNOWN
Definition nvToolsExt.h:423
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.
NVTX_DECLSPEC void NVTX_API nvtxInitialize(const void *reserved)
Force initialization (optional)
Event Attribute Structure. .
Definition nvToolsExt.h:568
uint16_t version
Version flag of the structure.
Definition nvToolsExt.h:576
int32_t colorType
Color type specified in this attribute structure.
Definition nvToolsExt.h:606
uint16_t size
Size of the structure.
Definition nvToolsExt.h:584
int32_t payloadType
Payload type specified in this attribute structure.
Definition nvToolsExt.h:622
nvtxMessageValue_t message
Message assigned to this attribute structure..
Definition nvToolsExt.h:656
int32_t messageType
Message type specified in this attribute structure.
Definition nvToolsExt.h:650
uint32_t color
Color assigned to this event..
Definition nvToolsExt.h:612
uint32_t category
ID of the category the event is assigned to.
Definition nvToolsExt.h:597
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:633
Identifier for the resource. .