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#if defined(NVTX_AS_SYSTEM_HEADER)
166#if defined(__clang__)
167#pragma clang system_header
168#elif defined(__GNUC__) || defined(__NVCOMPILER)
169#pragma GCC system_header
170#elif defined(_MSC_VER)
171#pragma system_header
172#endif
173#endif
174
175/* Header guard */
176#if !defined(NVTX_VERSION)
177#define NVTX_VERSION 3
178
179/* Platform-dependent defines:
180 *
181 * - NVTX_API - Calling conventions (only used on Windows, and only effects
182 * 32-bit x86 builds, i.e. callee pops stack instead of caller)
183 *
184 * - NVTX_DYNAMIC_EXPORT - Make function an exported entry point from a
185 * dynamic library or shared object.
186 *
187 * - NVTX_EXPORT_UNMANGLED_FUNCTION_NAME - When used inside the body of a
188 * function declared with NVTX_DYNAMIC_EXPORT, ensures the symbol exported
189 * for the function is the exact string of the function's name as written
190 * in the code. Name-mangling or name-decoration is disabled. Note that
191 * on many platforms this is not necessary, since either the function name
192 * is already exported verbatim, or the dynamic loader also checks for
193 * functions with the mangling applied. Forcing the exports to avoid any
194 * mangling simplifies usage across platforms and from other languages.
195 */
196#if defined(_WIN32)
197
198#define NVTX_API __stdcall
199
200#if defined(_MSC_VER)
201#define NVTX_DYNAMIC_EXPORT __declspec(dllexport)
202#else
203#define NVTX_DYNAMIC_EXPORT __attribute__((visibility("default"))) __declspec(dllexport)
204#endif
205
206#if defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_ARM64EC))
207#define NVTX_EXPORT_UNMANGLED_FUNCTION_NAME _Pragma("comment(linker, \"/EXPORT:\" __FUNCTION__ \"=\" __FUNCDNAME__)")
208#else
209#define NVTX_EXPORT_UNMANGLED_FUNCTION_NAME
210#endif
211
212#else /* POSIX-like platform */
213
214#define NVTX_API
215
216#define NVTX_DYNAMIC_EXPORT __attribute__((visibility("default")))
217
218#define NVTX_EXPORT_UNMANGLED_FUNCTION_NAME
219
220#endif /* Platform-dependent defines */
221
222/* Compiler-dependent defines:
223 *
224 * - NVTX_INLINE_STATIC - Ensure function has internal linkage, and suggest
225 * avoiding code-gen of the function. Without this, function has external
226 * linkage with a strong symbol, so linker expects only one definition.
227 */
228#if defined(_MSC_VER)
229
230#define NVTX_INLINE_STATIC __inline static
231
232#else /* GCC-like compiler */
233
234#if defined(__cplusplus) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
235#define NVTX_INLINE_STATIC inline static
236#else
237#define NVTX_INLINE_STATIC __inline__ static
238#endif
239
240#endif /* Compiler-dependent defines */
241
242#if !defined(NVTX_NULLPTR)
243#if defined(__cplusplus) && __cplusplus >= 201103L
244#define NVTX_NULLPTR nullptr
245#else
246#define NVTX_NULLPTR NULL
247#endif
248#endif
249
250#if defined(__cplusplus)
251#define NVTX_STATIC_CAST(type, value) (static_cast<type>(value))
252#define NVTX_REINTERPRET_CAST(type, value) (reinterpret_cast<type>(value))
253#else
254#define NVTX_STATIC_CAST(type, value) ((type)(value))
255#define NVTX_REINTERPRET_CAST(type, value) ((type)(value))
256#endif
257
258
259/* API linkage/export options:
260 *
261 * - By default, the NVTX API functions are declared as "inline", with the
262 * implementations provided in the headers. This allows multiple .c/.cpp
263 * files in the same project to include NVTX headers without duplicate-
264 * definition linker errors. An optimizing compiler should inline these
265 * implementations, ensuring that the overhead of making an NVTX call is as
266 * low as possible, even without enabling link-time optimizations.
267 *
268 * - NVTX_NO_IMPL - Use when writing NVTX tools. If this macro is defined,
269 * the NVTX headers will provide all the typedefs, macros, and declarations
270 * of API functions (not marked inline), but no function implementations.
271 *
272 * - NVTX_EXPORT_API - NVTX is normally used in C/C++ applications by simply
273 * including the headers. There is no need to link with a static library,
274 * or to ship a dynamic library with the application (this was changed in
275 * NVTX v3). For other languages, it's not convenient to use a header-only
276 * C library. The best way to provide an idiomatic NVTX API for another
277 * language is a .c file that includes the NVTX headers and implements
278 * functions for that language using its native calling conventions and
279 * datatypes -- this method can allow static linking to avoid depending on
280 * a separate dynamic library. Alternatively, other languages may support
281 * using C calling conventions to directly call C functions exported from a
282 * dynamic library. To build such a library, write a .c file that defines
283 * NVTX_EXPORT_API and includes any/all of the NVTX headers. Compile this
284 * file as a dynamic library, and the NVTX API functions from the included
285 * headers will be exported with no name-mangling or decoration. Defining
286 * ABI-compatible NVTX struct and enum types in the other language is the
287 * responsibility of the user of this dynamic library.
288 *
289 * Whichever of the above modes is chosen, the following macros are defined
290 * appropriately below to implement that mode. These macros are only defined
291 * if not already defined by the user, so they may be overridden by users to
292 * handle advanced cases.
293 *
294 * - NVTX_DECLSPEC - Specify linkage for NVTX API functions.
295 *
296 * - NVTX_SET_NAME_MANGLING_OPTIONS - If necessary for the platform, will use
297 * platform-dependent syntax for ensuring function name is exported with no
298 * name-mangling or decoration. Certain compiler and calling-convention
299 * combinations will add name-mangling or decorations when exporting NVTX
300 * function name symbols, which makes it much harder for other languages
301 * to access these functions. This macro must be used inside a function's
302 * body because it uses built-in macros to get the current function's name.
303 */
304#if defined(NVTX_NO_IMPL)
305
306/* When omitting implementation, avoid declaring functions inline
307 * without definitions, since this causes compiler warnings. */
308#if !defined(NVTX_DECLSPEC)
309#define NVTX_DECLSPEC
310#endif
311#if !defined(NVTX_SET_NAME_MANGLING_OPTIONS)
312#define NVTX_SET_NAME_MANGLING_OPTIONS
313#endif
314
315#elif defined(NVTX_EXPORT_API)
316
317/* Add platform-dependent declaration syntax to ensure NVTX API functions are
318 * exported when compiling as a dynamic library/shared object, and ensure the
319 * exported names are not mangled/decorated. */
320#if !defined(NVTX_DECLSPEC)
321#define NVTX_DECLSPEC NVTX_DYNAMIC_EXPORT
322#endif
323#if !defined(NVTX_SET_NAME_MANGLING_OPTIONS)
324#define NVTX_SET_NAME_MANGLING_OPTIONS NVTX_EXPORT_UNMANGLED_FUNCTION_NAME
325#endif
326
327#else /* Normal NVTX usage */
328
329/* Functions definitions are provided, and functions are declared inline to
330 * avoid duplicate-definition linker errors when using multiple source files. */
331#if !defined(NVTX_DECLSPEC)
332#define NVTX_DECLSPEC NVTX_INLINE_STATIC
333#endif
334#if !defined(NVTX_SET_NAME_MANGLING_OPTIONS)
335#define NVTX_SET_NAME_MANGLING_OPTIONS
336#endif
337
338#endif
339
340/* Platform-dependent helpers for defining global variables in header files.
341 * Ensures the linker uses only one instance when multiple source files include
342 * the headers, avoiding duplicate-definition linker errors. */
343#include "nvtxDetail/nvtxLinkOnce.h"
344
345/* Macros for applying major-version-specific suffix to NVTX global symbols, so
346 * usage of different versions in different source files is supported without
347 * violating the one-definition rule. */
348#define NVTX_VERSIONED_IDENTIFIER_L3(NAME, VERSION) NAME##_v##VERSION
349#define NVTX_VERSIONED_IDENTIFIER_L2(NAME, VERSION) NVTX_VERSIONED_IDENTIFIER_L3(NAME, VERSION)
350#define NVTX_VERSIONED_IDENTIFIER(NAME) NVTX_VERSIONED_IDENTIFIER_L2(NAME, NVTX_VERSION)
351
371#ifndef NVTX_STDINT_TYPES_ALREADY_DEFINED
372#include <stdint.h>
373#endif
374
375#include <stddef.h>
376
377#ifdef __cplusplus
378extern "C" {
379#endif /* __cplusplus */
380
384#define NVTX_SUCCESS 0
385#define NVTX_FAIL 1
386#define NVTX_ERR_INIT_LOAD_PROPERTY 2
387#define NVTX_ERR_INIT_ACCESS_LIBRARY 3
388#define NVTX_ERR_INIT_LOAD_LIBRARY 4
389#define NVTX_ERR_INIT_MISSING_LIBRARY_ENTRY_POINT 5
390#define NVTX_ERR_INIT_FAILED_LIBRARY_ENTRY_POINT 6
391#define NVTX_ERR_NO_INJECTION_LIBRARY_AVAILABLE 7
392
396#define NVTX_EVENT_ATTRIB_STRUCT_SIZE (NVTX_STATIC_CAST(uint16_t, sizeof(nvtxEventAttributes_t)))
397
398#define NVTX_NO_PUSH_POP_TRACKING (NVTX_STATIC_CAST(int, -2))
399
400typedef uint64_t nvtxRangeId_t;
401
402/* Forward declaration of opaque domain registration structure */
403struct nvtxDomainRegistration_st;
404typedef struct nvtxDomainRegistration_st nvtxDomainRegistration;
405
406/* \brief Domain Handle Structure.
407* \anchor DOMAIN_HANDLE_STRUCTURE
408*
409* This structure is opaque to the user and is used as a handle to reference
410* a domain. This type is returned from tools when using the NVTX API to
411* create a domain.
412*
413*/
414typedef nvtxDomainRegistration* nvtxDomainHandle_t;
415
416/* Forward declaration of opaque string registration structure */
417struct nvtxStringRegistration_st;
418typedef struct nvtxStringRegistration_st nvtxStringRegistration;
419
420/* \brief Registered String Handle Structure.
421* \anchor REGISTERED_STRING_HANDLE_STRUCTURE
422*
423* This structure is opaque to the user and is used as a handle to reference
424* a registered string. This type is returned from tools when using the NVTX
425* API to create a registered string.
426*
427*/
428typedef nvtxStringRegistration* nvtxStringHandle_t;
429
430/* ========================================================================= */
443
457
459{
460 const char* ascii;
461 const wchar_t* unicode;
462 /* NVTX_VERSION_2 */
463 nvtxStringHandle_t registered;
465
466
467/* ------------------------------------------------------------------------- */
490NVTX_DECLSPEC void NVTX_API nvtxInitialize(const void* reserved);
/*END defgroup*/
495
496/* ========================================================================= */
515
593{
601 uint16_t version;
602
609 uint16_t size;
610
622 uint32_t category;
623
631 int32_t colorType; /* nvtxColorType_t */
632
637 uint32_t color;
638
647 int32_t payloadType; /* nvtxPayloadType_t */
648
649 int32_t reserved0;
650
658 {
659 uint64_t ullValue;
660 int64_t llValue;
661 double dValue;
662 /* NVTX_VERSION_2 */
663 uint32_t uiValue;
664 int32_t iValue;
665 float fValue;
666 } payload;
667
675 int32_t messageType; /* nvtxMessageType_t */
676
682
684
685typedef struct nvtxEventAttributes_v2 nvtxEventAttributes_t;
686
/*END defgroup*/
688/* ========================================================================= */
698/* ------------------------------------------------------------------------- */
718NVTX_DECLSPEC void NVTX_API nvtxDomainMarkEx(nvtxDomainHandle_t domain, const nvtxEventAttributes_t* eventAttrib);
721/* ------------------------------------------------------------------------- */
755NVTX_DECLSPEC void NVTX_API nvtxMarkEx(const nvtxEventAttributes_t* eventAttrib);
758/* ------------------------------------------------------------------------- */
779NVTX_DECLSPEC void NVTX_API nvtxMarkA(const char* message);
780NVTX_DECLSPEC void NVTX_API nvtxMarkW(const wchar_t* message);
786/* ------------------------------------------------------------------------- */
816NVTX_DECLSPEC nvtxRangeId_t NVTX_API nvtxDomainRangeStartEx(nvtxDomainHandle_t domain, const nvtxEventAttributes_t* eventAttrib);
819/* ------------------------------------------------------------------------- */
851NVTX_DECLSPEC nvtxRangeId_t NVTX_API nvtxRangeStartEx(const nvtxEventAttributes_t* eventAttrib);
854/* ------------------------------------------------------------------------- */
879NVTX_DECLSPEC nvtxRangeId_t NVTX_API nvtxRangeStartA(const char* message);
880NVTX_DECLSPEC nvtxRangeId_t NVTX_API nvtxRangeStartW(const wchar_t* message);
883/* ------------------------------------------------------------------------- */
911NVTX_DECLSPEC void NVTX_API nvtxDomainRangeEnd(nvtxDomainHandle_t domain, nvtxRangeId_t id);
914/* ------------------------------------------------------------------------- */
927NVTX_DECLSPEC void NVTX_API nvtxRangeEnd(nvtxRangeId_t id);
932/* ------------------------------------------------------------------------- */
969NVTX_DECLSPEC int NVTX_API nvtxDomainRangePushEx(nvtxDomainHandle_t domain, const nvtxEventAttributes_t* eventAttrib);
972/* ------------------------------------------------------------------------- */
1008NVTX_DECLSPEC int NVTX_API nvtxRangePushEx(const nvtxEventAttributes_t* eventAttrib);
1011/* ------------------------------------------------------------------------- */
1034NVTX_DECLSPEC int NVTX_API nvtxRangePushA(const char* message);
1035NVTX_DECLSPEC int NVTX_API nvtxRangePushW(const wchar_t* message);
1039/* ------------------------------------------------------------------------- */
1074NVTX_DECLSPEC int NVTX_API nvtxDomainRangePop(nvtxDomainHandle_t domain);
1077/* ------------------------------------------------------------------------- */
1099NVTX_DECLSPEC int NVTX_API nvtxRangePop(void);
/*END defgroup*/
1104/* ========================================================================= */
1113/* ------------------------------------------------------------------------- */
1115/* ------------------------------------------------------------------------- */
1116
1117/* ------------------------------------------------------------------------- */
1124#define NVTX_RESOURCE_MAKE_TYPE(CLASS, INDEX) (((NVTX_STATIC_CAST(uint32_t, NVTX_RESOURCE_CLASS_ ## CLASS))<<16)|(NVTX_STATIC_CAST(uint32_t, INDEX)))
1125#define NVTX_RESOURCE_CLASS_GENERIC 1
1128/* ------------------------------------------------------------------------- */
1137{
1138 NVTX_RESOURCE_TYPE_UNKNOWN = 0,
1139 NVTX_RESOURCE_TYPE_GENERIC_POINTER = NVTX_RESOURCE_MAKE_TYPE(GENERIC, 1),
1140 NVTX_RESOURCE_TYPE_GENERIC_HANDLE = NVTX_RESOURCE_MAKE_TYPE(GENERIC, 2),
1141 NVTX_RESOURCE_TYPE_GENERIC_THREAD_NATIVE = NVTX_RESOURCE_MAKE_TYPE(GENERIC, 3),
1142 NVTX_RESOURCE_TYPE_GENERIC_THREAD_POSIX = NVTX_RESOURCE_MAKE_TYPE(GENERIC, 4)
1144
1145
1146
1222{
1230 uint16_t version;
1231
1238 uint16_t size;
1239
1248 int32_t identifierType; /* values from enums following the pattern nvtxResource[name]Type_t */
1249
1258 {
1259 const void* pValue;
1260 uint64_t ullValue;
1261 } identifier;
1262
1270 int32_t messageType; /* nvtxMessageType_t */
1271
1277
1279
1280typedef struct nvtxResourceAttributes_v0 nvtxResourceAttributes_t;
1281
1282/* \cond SHOW_HIDDEN
1283* \version NVTX_VERSION_2
1284*/
1285#define NVTX_RESOURCE_ATTRIB_STRUCT_SIZE (NVTX_STATIC_CAST(uint16_t, sizeof(nvtxResourceAttributes_v0)))
1286typedef struct nvtxResourceHandle* nvtxResourceHandle_t;
1291/* ------------------------------------------------------------------------- */
1322NVTX_DECLSPEC nvtxResourceHandle_t NVTX_API nvtxDomainResourceCreate(nvtxDomainHandle_t domain, nvtxResourceAttributes_t* attribs);
1325/* ------------------------------------------------------------------------- */
1353NVTX_DECLSPEC void NVTX_API nvtxDomainResourceDestroy(nvtxResourceHandle_t resource);
1359/* ------------------------------------------------------------------------- */
1388NVTX_DECLSPEC void NVTX_API nvtxDomainNameCategoryA(nvtxDomainHandle_t domain, uint32_t category, const char* name);
1389NVTX_DECLSPEC void NVTX_API nvtxDomainNameCategoryW(nvtxDomainHandle_t domain, uint32_t category, const wchar_t* name);
1414NVTX_DECLSPEC void NVTX_API nvtxNameCategoryA(uint32_t category, const char* name);
1415NVTX_DECLSPEC void NVTX_API nvtxNameCategoryW(uint32_t category, const wchar_t* name);
1420/* ------------------------------------------------------------------------- */
1483NVTX_DECLSPEC void NVTX_API nvtxNameOsThreadA(uint32_t threadId, const char* name);
1484NVTX_DECLSPEC void NVTX_API nvtxNameOsThreadW(uint32_t threadId, const wchar_t* name);
/*END defgroup*/
1489/* ========================================================================= */
1501/* ------------------------------------------------------------------------- */
1533NVTX_DECLSPEC nvtxStringHandle_t NVTX_API nvtxDomainRegisterStringA(nvtxDomainHandle_t domain, const char* string);
1534NVTX_DECLSPEC nvtxStringHandle_t NVTX_API nvtxDomainRegisterStringW(nvtxDomainHandle_t domain, const wchar_t* string);
/*END defgroup*/
1538/* ========================================================================= */
1557/* ------------------------------------------------------------------------- */
1597NVTX_DECLSPEC nvtxDomainHandle_t NVTX_API nvtxDomainCreateA(const char* name);
1598NVTX_DECLSPEC nvtxDomainHandle_t NVTX_API nvtxDomainCreateW(const wchar_t* name);
1601/* ------------------------------------------------------------------------- */
1622NVTX_DECLSPEC void NVTX_API nvtxDomainDestroy(nvtxDomainHandle_t domain);
/*END defgroup*/
1627/* ========================================================================= */
1630#ifdef UNICODE
1631 #define nvtxMark nvtxMarkW
1632 #define nvtxRangeStart nvtxRangeStartW
1633 #define nvtxRangePush nvtxRangePushW
1634 #define nvtxNameCategory nvtxNameCategoryW
1635 #define nvtxNameOsThread nvtxNameOsThreadW
1636 /* NVTX_VERSION_2 */
1637 #define nvtxDomainCreate nvtxDomainCreateW
1638 #define nvtxDomainRegisterString nvtxDomainRegisterStringW
1639 #define nvtxDomainNameCategory nvtxDomainNameCategoryW
1640#else
1641 #define nvtxMark nvtxMarkA
1642 #define nvtxRangeStart nvtxRangeStartA
1643 #define nvtxRangePush nvtxRangePushA
1644 #define nvtxNameCategory nvtxNameCategoryA
1645 #define nvtxNameOsThread nvtxNameOsThreadA
1646 /* NVTX_VERSION_2 */
1647 #define nvtxDomainCreate nvtxDomainCreateA
1648 #define nvtxDomainRegisterString nvtxDomainRegisterStringA
1649 #define nvtxDomainNameCategory nvtxDomainNameCategoryA
1650#endif
1651
1654#ifdef __cplusplus
1655} /* extern "C" */
1656#endif /* __cplusplus */
1657
1658#define NVTX_IMPL_GUARD /* Ensure other headers cannot be included directly */
1659
1660#include "nvtxDetail/nvtxTypes.h"
1661
1662#ifndef NVTX_NO_IMPL
1663#include "nvtxDetail/nvtxImpl.h"
1664#endif /*NVTX_NO_IMPL*/
1665
1666#undef NVTX_IMPL_GUARD
1667
1668#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:505
@ NVTX_PAYLOAD_TYPE_INT32
Definition nvToolsExt.h:512
@ NVTX_PAYLOAD_TYPE_DOUBLE
Definition nvToolsExt.h:509
@ NVTX_PAYLOAD_UNKNOWN
Definition nvToolsExt.h:506
@ NVTX_PAYLOAD_TYPE_UNSIGNED_INT32
Definition nvToolsExt.h:511
@ NVTX_PAYLOAD_TYPE_FLOAT
Definition nvToolsExt.h:513
@ NVTX_PAYLOAD_TYPE_INT64
Definition nvToolsExt.h:508
@ NVTX_PAYLOAD_TYPE_UNSIGNED_INT64
Definition nvToolsExt.h:507
NVTX_DECLSPEC void NVTX_API nvtxInitialize(const void *reserved)
Force initialization (optional) .
nvtxColorType_t
Definition nvToolsExt.h:439
nvtxMessageType_t
Definition nvToolsExt.h:448
@ NVTX_COLOR_ARGB
Definition nvToolsExt.h:441
@ NVTX_COLOR_UNKNOWN
Definition nvToolsExt.h:440
@ NVTX_MESSAGE_TYPE_REGISTERED
Definition nvToolsExt.h:453
@ NVTX_MESSAGE_TYPE_UNICODE
Definition nvToolsExt.h:451
@ NVTX_MESSAGE_TYPE_ASCII
Definition nvToolsExt.h:450
@ NVTX_MESSAGE_UNKNOWN
Definition nvToolsExt.h:449
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:593
uint16_t version
Version flag of the structure.
Definition nvToolsExt.h:601
int32_t colorType
Color type specified in this attribute structure.
Definition nvToolsExt.h:631
uint16_t size
Size of the structure.
Definition nvToolsExt.h:609
int32_t payloadType
Payload type specified in this attribute structure.
Definition nvToolsExt.h:647
nvtxMessageValue_t message
Message assigned to this attribute structure..
Definition nvToolsExt.h:681
int32_t messageType
Message type specified in this attribute structure.
Definition nvToolsExt.h:675
uint32_t color
Color assigned to this event..
Definition nvToolsExt.h:637
uint32_t category
ID of the category the event is assigned to.
Definition nvToolsExt.h:622
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:658
Identifier for the resource. .