File indexing completed on 2026-05-10 08:45:12
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 #ifndef NVTX_IMPL_GUARD_CUDA
0022 #error Never include this file directly -- it is automatically included by nvToolsExtCuda.h (except when NVTX_NO_IMPL is defined).
0023 #endif
0024
0025 #if defined(NVTX_AS_SYSTEM_HEADER)
0026 #if defined(__clang__)
0027 #pragma clang system_header
0028 #elif defined(__GNUC__) || defined(__NVCOMPILER)
0029 #pragma GCC system_header
0030 #elif defined(_MSC_VER)
0031 #pragma system_header
0032 #endif
0033 #endif
0034
0035
0036 #ifdef __cplusplus
0037 extern "C" {
0038 #endif
0039
0040 typedef void (NVTX_API * nvtxNameCuDeviceA_impl_fntype)(CUdevice device, const char* name);
0041 typedef void (NVTX_API * nvtxNameCuDeviceW_impl_fntype)(CUdevice device, const wchar_t* name);
0042 typedef void (NVTX_API * nvtxNameCuContextA_impl_fntype)(CUcontext context, const char* name);
0043 typedef void (NVTX_API * nvtxNameCuContextW_impl_fntype)(CUcontext context, const wchar_t* name);
0044 typedef void (NVTX_API * nvtxNameCuStreamA_impl_fntype)(CUstream stream, const char* name);
0045 typedef void (NVTX_API * nvtxNameCuStreamW_impl_fntype)(CUstream stream, const wchar_t* name);
0046 typedef void (NVTX_API * nvtxNameCuEventA_impl_fntype)(CUevent event, const char* name);
0047 typedef void (NVTX_API * nvtxNameCuEventW_impl_fntype)(CUevent event, const wchar_t* name);
0048
0049 NVTX_DECLSPEC void NVTX_API nvtxNameCuDeviceA(CUdevice device, const char* name)
0050 {
0051 NVTX_SET_NAME_MANGLING_OPTIONS
0052 #ifdef NVTX_DISABLE
0053 (void)device;
0054 (void)name;
0055 #else
0056 nvtxNameCuDeviceA_impl_fntype local = NVTX_VERSIONED_IDENTIFIER(nvtxGlobals).nvtxNameCuDeviceA_impl_fnptr;
0057 if (local != NVTX_NULLPTR)
0058 (*local)(device, name);
0059 #endif
0060 }
0061
0062 NVTX_DECLSPEC void NVTX_API nvtxNameCuDeviceW(CUdevice device, const wchar_t* name)
0063 {
0064 NVTX_SET_NAME_MANGLING_OPTIONS
0065 #ifdef NVTX_DISABLE
0066 (void)device;
0067 (void)name;
0068 #else
0069 nvtxNameCuDeviceW_impl_fntype local = NVTX_VERSIONED_IDENTIFIER(nvtxGlobals).nvtxNameCuDeviceW_impl_fnptr;
0070 if (local != NVTX_NULLPTR)
0071 (*local)(device, name);
0072 #endif
0073 }
0074
0075 NVTX_DECLSPEC void NVTX_API nvtxNameCuContextA(CUcontext context, const char* name)
0076 {
0077 NVTX_SET_NAME_MANGLING_OPTIONS
0078 #ifdef NVTX_DISABLE
0079 (void)context;
0080 (void)name;
0081 #else
0082 nvtxNameCuContextA_impl_fntype local = NVTX_REINTERPRET_CAST(nvtxNameCuContextA_impl_fntype, NVTX_VERSIONED_IDENTIFIER(nvtxGlobals).nvtxNameCuContextA_impl_fnptr);
0083 if (local != NVTX_NULLPTR)
0084 (*local)(context, name);
0085 #endif
0086 }
0087
0088 NVTX_DECLSPEC void NVTX_API nvtxNameCuContextW(CUcontext context, const wchar_t* name)
0089 {
0090 NVTX_SET_NAME_MANGLING_OPTIONS
0091 #ifdef NVTX_DISABLE
0092 (void)context;
0093 (void)name;
0094 #else
0095 nvtxNameCuContextW_impl_fntype local = NVTX_REINTERPRET_CAST(nvtxNameCuContextW_impl_fntype, NVTX_VERSIONED_IDENTIFIER(nvtxGlobals).nvtxNameCuContextW_impl_fnptr);
0096 if (local != NVTX_NULLPTR)
0097 (*local)(context, name);
0098 #endif
0099 }
0100
0101 NVTX_DECLSPEC void NVTX_API nvtxNameCuStreamA(CUstream stream, const char* name)
0102 {
0103 NVTX_SET_NAME_MANGLING_OPTIONS
0104 #ifdef NVTX_DISABLE
0105 (void)stream;
0106 (void)name;
0107 #else
0108 nvtxNameCuStreamA_impl_fntype local = NVTX_REINTERPRET_CAST(nvtxNameCuStreamA_impl_fntype, NVTX_VERSIONED_IDENTIFIER(nvtxGlobals).nvtxNameCuStreamA_impl_fnptr);
0109 if (local != NVTX_NULLPTR)
0110 (*local)(stream, name);
0111 #endif
0112 }
0113
0114 NVTX_DECLSPEC void NVTX_API nvtxNameCuStreamW(CUstream stream, const wchar_t* name)
0115 {
0116 NVTX_SET_NAME_MANGLING_OPTIONS
0117 #ifdef NVTX_DISABLE
0118 (void)stream;
0119 (void)name;
0120 #else
0121 nvtxNameCuStreamW_impl_fntype local = NVTX_REINTERPRET_CAST(nvtxNameCuStreamW_impl_fntype, NVTX_VERSIONED_IDENTIFIER(nvtxGlobals).nvtxNameCuStreamW_impl_fnptr);
0122 if (local != NVTX_NULLPTR)
0123 (*local)(stream, name);
0124 #endif
0125 }
0126
0127 NVTX_DECLSPEC void NVTX_API nvtxNameCuEventA(CUevent event, const char* name)
0128 {
0129 NVTX_SET_NAME_MANGLING_OPTIONS
0130 #ifdef NVTX_DISABLE
0131 (void)event;
0132 (void)name;
0133 #else
0134 nvtxNameCuEventA_impl_fntype local = NVTX_REINTERPRET_CAST(nvtxNameCuEventA_impl_fntype, NVTX_VERSIONED_IDENTIFIER(nvtxGlobals).nvtxNameCuEventA_impl_fnptr);
0135 if (local != NVTX_NULLPTR)
0136 (*local)(event, name);
0137 #endif
0138 }
0139
0140 NVTX_DECLSPEC void NVTX_API nvtxNameCuEventW(CUevent event, const wchar_t* name)
0141 {
0142 NVTX_SET_NAME_MANGLING_OPTIONS
0143 #ifdef NVTX_DISABLE
0144 (void)event;
0145 (void)name;
0146 #else
0147 nvtxNameCuEventW_impl_fntype local = NVTX_REINTERPRET_CAST(nvtxNameCuEventW_impl_fntype, NVTX_VERSIONED_IDENTIFIER(nvtxGlobals).nvtxNameCuEventW_impl_fnptr);
0148 if (local != NVTX_NULLPTR)
0149 (*local)(event, name);
0150 #endif
0151 }
0152
0153 #ifdef __cplusplus
0154 }
0155 #endif
0156