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* A value of 0 (or NULL) is a null handle and does not reference a created
416* domain. Applications may initialize handle variables to 0 and compare them
417* with 0 to determine whether they reference a created domain.
418*
419*/
420typedef nvtxDomainRegistration* nvtxDomainHandle_t;
421
422/* Forward declaration of opaque string registration structure */
423struct nvtxStringRegistration_st;
424typedef struct nvtxStringRegistration_st nvtxStringRegistration;
425
433typedef nvtxStringRegistration* nvtxStringHandle_t;
434
435/* ========================================================================= */
448
462
464{
465 const char* ascii;
466 const wchar_t* unicode;
467 /* NVTX_VERSION_2 */
468 nvtxStringHandle_t registered;
470
471
472/* ------------------------------------------------------------------------- */
495NVTX_DECLSPEC void NVTX_API nvtxInitialize(const void* reserved);
/*END defgroup*/
500
501/* ========================================================================= */
520
598{
606 uint16_t version;
607
614 uint16_t size;
615
627 uint32_t category;
628
636 int32_t colorType; /* nvtxColorType_t */
637
642 uint32_t color;
643
652 int32_t payloadType; /* nvtxPayloadType_t */
653
654 int32_t reserved0;
655
663 {
664 uint64_t ullValue;
665 int64_t llValue;
666 double dValue;
667 /* NVTX_VERSION_2 */
668 uint32_t uiValue;
669 int32_t iValue;
670 float fValue;
671 } payload;
672
680 int32_t messageType; /* nvtxMessageType_t */
681
687
689
690typedef struct nvtxEventAttributes_v2 nvtxEventAttributes_t;
691
/*END defgroup*/
693/* ========================================================================= */
703/* ------------------------------------------------------------------------- */
723NVTX_DECLSPEC void NVTX_API nvtxDomainMarkEx(nvtxDomainHandle_t domain, const nvtxEventAttributes_t* eventAttrib);
726/* ------------------------------------------------------------------------- */
760NVTX_DECLSPEC void NVTX_API nvtxMarkEx(const nvtxEventAttributes_t* eventAttrib);
763/* ------------------------------------------------------------------------- */
784NVTX_DECLSPEC void NVTX_API nvtxMarkA(const char* message);
786NVTX_DECLSPEC void NVTX_API nvtxMarkW(const wchar_t* message);
792/* ------------------------------------------------------------------------- */
825NVTX_DECLSPEC nvtxRangeId_t NVTX_API nvtxDomainRangeStartEx(nvtxDomainHandle_t domain, const nvtxEventAttributes_t* eventAttrib);
828/* ------------------------------------------------------------------------- */
863NVTX_DECLSPEC nvtxRangeId_t NVTX_API nvtxRangeStartEx(const nvtxEventAttributes_t* eventAttrib);
866/* ------------------------------------------------------------------------- */
894NVTX_DECLSPEC nvtxRangeId_t NVTX_API nvtxRangeStartA(const char* message);
895NVTX_DECLSPEC nvtxRangeId_t NVTX_API nvtxRangeStartW(const wchar_t* message);
898/* ------------------------------------------------------------------------- */
926NVTX_DECLSPEC void NVTX_API nvtxDomainRangeEnd(nvtxDomainHandle_t domain, nvtxRangeId_t id);
929/* ------------------------------------------------------------------------- */
942NVTX_DECLSPEC void NVTX_API nvtxRangeEnd(nvtxRangeId_t id);
947/* ------------------------------------------------------------------------- */
984NVTX_DECLSPEC int NVTX_API nvtxDomainRangePushEx(nvtxDomainHandle_t domain, const nvtxEventAttributes_t* eventAttrib);
987/* ------------------------------------------------------------------------- */
1023NVTX_DECLSPEC int NVTX_API nvtxRangePushEx(const nvtxEventAttributes_t* eventAttrib);
1026/* ------------------------------------------------------------------------- */
1049NVTX_DECLSPEC int NVTX_API nvtxRangePushA(const char* message);
1050NVTX_DECLSPEC int NVTX_API nvtxRangePushW(const wchar_t* message);
1054/* ------------------------------------------------------------------------- */
1089NVTX_DECLSPEC int NVTX_API nvtxDomainRangePop(nvtxDomainHandle_t domain);
1092/* ------------------------------------------------------------------------- */
1114NVTX_DECLSPEC int NVTX_API nvtxRangePop(void);
/*END defgroup*/
1119/* ========================================================================= */
1128/* ------------------------------------------------------------------------- */
1130/* ------------------------------------------------------------------------- */
1131
1132/* ------------------------------------------------------------------------- */
1139#define NVTX_RESOURCE_MAKE_TYPE(CLASS, INDEX) (((NVTX_STATIC_CAST(uint32_t, NVTX_RESOURCE_CLASS_ ## CLASS))<<16)|(NVTX_STATIC_CAST(uint32_t, INDEX)))
1140#define NVTX_RESOURCE_CLASS_GENERIC 1
1143/* ------------------------------------------------------------------------- */
1152{
1153 NVTX_RESOURCE_TYPE_UNKNOWN = 0,
1154 NVTX_RESOURCE_TYPE_GENERIC_POINTER = NVTX_RESOURCE_MAKE_TYPE(GENERIC, 1),
1155 NVTX_RESOURCE_TYPE_GENERIC_HANDLE = NVTX_RESOURCE_MAKE_TYPE(GENERIC, 2),
1156 NVTX_RESOURCE_TYPE_GENERIC_THREAD_NATIVE = NVTX_RESOURCE_MAKE_TYPE(GENERIC, 3),
1157 NVTX_RESOURCE_TYPE_GENERIC_THREAD_POSIX = NVTX_RESOURCE_MAKE_TYPE(GENERIC, 4)
1159
1160
1161
1236{
1244 uint16_t version;
1245
1252 uint16_t size;
1253
1262 int32_t identifierType; /* values from enums following the pattern nvtxResource[name]Type_t */
1263
1272 {
1273 const void* pValue;
1274 uint64_t ullValue;
1275 } identifier;
1276
1284 int32_t messageType; /* nvtxMessageType_t */
1285
1291
1293
1294typedef struct nvtxResourceAttributes_v0 nvtxResourceAttributes_t;
1295
1296/* \cond SHOW_HIDDEN
1297* \version NVTX_VERSION_2
1298*/
1299#define NVTX_RESOURCE_ATTRIB_STRUCT_SIZE (NVTX_STATIC_CAST(uint16_t, sizeof(nvtxResourceAttributes_v0)))
1300typedef struct nvtxResourceHandle* nvtxResourceHandle_t;
1305/* ------------------------------------------------------------------------- */
1338NVTX_DECLSPEC nvtxResourceHandle_t NVTX_API nvtxDomainResourceCreate(nvtxDomainHandle_t domain, nvtxResourceAttributes_t* attribs);
1341/* ------------------------------------------------------------------------- */
1369NVTX_DECLSPEC void NVTX_API nvtxDomainResourceDestroy(nvtxResourceHandle_t resource);
1375/* ------------------------------------------------------------------------- */
1404NVTX_DECLSPEC void NVTX_API nvtxDomainNameCategoryA(nvtxDomainHandle_t domain, uint32_t category, const char* name);
1405NVTX_DECLSPEC void NVTX_API nvtxDomainNameCategoryW(nvtxDomainHandle_t domain, uint32_t category, const wchar_t* name);
1430NVTX_DECLSPEC void NVTX_API nvtxNameCategoryA(uint32_t category, const char* name);
1432NVTX_DECLSPEC void NVTX_API nvtxNameCategoryW(uint32_t category, const wchar_t* name);
1437/* ------------------------------------------------------------------------- */
1500NVTX_DECLSPEC void NVTX_API nvtxNameOsThreadA(uint32_t threadId, const char* name);
1501NVTX_DECLSPEC void NVTX_API nvtxNameOsThreadW(uint32_t threadId, const wchar_t* name);
/*END defgroup*/
1506/* ========================================================================= */
1518/* ------------------------------------------------------------------------- */
1551NVTX_DECLSPEC nvtxStringHandle_t NVTX_API nvtxDomainRegisterStringA(nvtxDomainHandle_t domain, const char* string);
1553NVTX_DECLSPEC nvtxStringHandle_t NVTX_API nvtxDomainRegisterStringW(nvtxDomainHandle_t domain, const wchar_t* string);
/*END defgroup*/
1557/* ========================================================================= */
1576/* ------------------------------------------------------------------------- */
1617NVTX_DECLSPEC nvtxDomainHandle_t NVTX_API nvtxDomainCreateA(const char* name);
1618NVTX_DECLSPEC nvtxDomainHandle_t NVTX_API nvtxDomainCreateW(const wchar_t* name);
1621/* ------------------------------------------------------------------------- */
1642NVTX_DECLSPEC void NVTX_API nvtxDomainDestroy(nvtxDomainHandle_t domain);
/*END defgroup*/
1647/* ========================================================================= */
1650#ifdef UNICODE
1651 #define nvtxMark nvtxMarkW
1652 #define nvtxRangeStart nvtxRangeStartW
1653 #define nvtxRangePush nvtxRangePushW
1654 #define nvtxNameCategory nvtxNameCategoryW
1655 #define nvtxNameOsThread nvtxNameOsThreadW
1656 /* NVTX_VERSION_2 */
1657 #define nvtxDomainCreate nvtxDomainCreateW
1658 #define nvtxDomainRegisterString nvtxDomainRegisterStringW
1659 #define nvtxDomainNameCategory nvtxDomainNameCategoryW
1660#else
1661 #define nvtxMark nvtxMarkA
1662 #define nvtxRangeStart nvtxRangeStartA
1663 #define nvtxRangePush nvtxRangePushA
1664 #define nvtxNameCategory nvtxNameCategoryA
1665 #define nvtxNameOsThread nvtxNameOsThreadA
1666 /* NVTX_VERSION_2 */
1667 #define nvtxDomainCreate nvtxDomainCreateA
1668 #define nvtxDomainRegisterString nvtxDomainRegisterStringA
1669 #define nvtxDomainNameCategory nvtxDomainNameCategoryA
1670#endif
1671
1674#ifdef __cplusplus
1675} /* extern "C" */
1676#endif /* __cplusplus */
1677
1678#define NVTX_IMPL_GUARD /* Ensure other headers cannot be included directly */
1679
1680#include "nvtxDetail/nvtxTypes.h"
1681
1682#ifndef NVTX_NO_IMPL
1683#include "nvtxDetail/nvtxImpl.h"
1684#endif /*NVTX_NO_IMPL*/
1685
1686#undef NVTX_IMPL_GUARD
1687
1688#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:510
@ NVTX_PAYLOAD_TYPE_INT32
Definition nvToolsExt.h:517
@ NVTX_PAYLOAD_TYPE_DOUBLE
Definition nvToolsExt.h:514
@ NVTX_PAYLOAD_UNKNOWN
Definition nvToolsExt.h:511
@ NVTX_PAYLOAD_TYPE_UNSIGNED_INT32
Definition nvToolsExt.h:516
@ NVTX_PAYLOAD_TYPE_FLOAT
Definition nvToolsExt.h:518
@ NVTX_PAYLOAD_TYPE_INT64
Definition nvToolsExt.h:513
@ NVTX_PAYLOAD_TYPE_UNSIGNED_INT64
Definition nvToolsExt.h:512
NVTX_DECLSPEC void NVTX_API nvtxInitialize(const void *reserved)
Force initialization (optional) .
nvtxColorType_t
Definition nvToolsExt.h:444
nvtxMessageType_t
Definition nvToolsExt.h:453
@ NVTX_COLOR_ARGB
Definition nvToolsExt.h:446
@ NVTX_COLOR_UNKNOWN
Definition nvToolsExt.h:445
@ NVTX_MESSAGE_TYPE_REGISTERED
Definition nvToolsExt.h:458
@ NVTX_MESSAGE_TYPE_UNICODE
Definition nvToolsExt.h:456
@ NVTX_MESSAGE_TYPE_ASCII
Definition nvToolsExt.h:455
@ NVTX_MESSAGE_UNKNOWN
Definition nvToolsExt.h:454
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 void NVTX_API nvtxMarkW(const wchar_t *message)
Marks an instantaneous event in the application.
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 nvtxNameCategoryW(uint32_t category, const wchar_t *name)
Annotate an NVTX category.
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 nvtxStringHandle_t NVTX_API nvtxDomainRegisterStringW(nvtxDomainHandle_t domain, const wchar_t *string)
Register a string.
nvtxStringRegistration * nvtxStringHandle_t
Registered string handle.
Definition nvToolsExt.h:433
Event Attribute Structure. .
Definition nvToolsExt.h:598
uint16_t version
Version flag of the structure.
Definition nvToolsExt.h:606
int32_t colorType
Color type specified in this attribute structure.
Definition nvToolsExt.h:636
uint16_t size
Size of the structure.
Definition nvToolsExt.h:614
int32_t payloadType
Payload type specified in this attribute structure.
Definition nvToolsExt.h:652
nvtxMessageValue_t message
Message assigned to this attribute structure..
Definition nvToolsExt.h:686
int32_t messageType
Message type specified in this attribute structure.
Definition nvToolsExt.h:680
uint32_t color
Color assigned to this event..
Definition nvToolsExt.h:642
uint32_t category
ID of the category the event is assigned to.
Definition nvToolsExt.h:627
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:663
Identifier for the resource. .