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_CUDART
0022 #error Never include this file directly -- it is automatically included by nvToolsExtCudaRt.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 * nvtxNameCudaDeviceA_impl_fntype)(int device, const char* name);
0041 typedef void (NVTX_API * nvtxNameCudaDeviceW_impl_fntype)(int device, const wchar_t* name);
0042 typedef void (NVTX_API * nvtxNameCudaStreamA_impl_fntype)(cudaStream_t stream, const char* name);
0043 typedef void (NVTX_API * nvtxNameCudaStreamW_impl_fntype)(cudaStream_t stream, const wchar_t* name);
0044 typedef void (NVTX_API * nvtxNameCudaEventA_impl_fntype)(cudaEvent_t event, const char* name);
0045 typedef void (NVTX_API * nvtxNameCudaEventW_impl_fntype)(cudaEvent_t event, const wchar_t* name);
0046
0047 NVTX_DECLSPEC void NVTX_API nvtxNameCudaDeviceA(int device, const char* name)
0048 {
0049 NVTX_SET_NAME_MANGLING_OPTIONS
0050 #ifdef NVTX_DISABLE
0051 (void)device;
0052 (void)name;
0053 #else
0054 nvtxNameCudaDeviceA_impl_fntype local = NVTX_VERSIONED_IDENTIFIER(nvtxGlobals).nvtxNameCudaDeviceA_impl_fnptr;
0055 if (local != NVTX_NULLPTR)
0056 (*local)(device, name);
0057 #endif
0058 }
0059
0060 NVTX_DECLSPEC void NVTX_API nvtxNameCudaDeviceW(int device, const wchar_t* name)
0061 {
0062 NVTX_SET_NAME_MANGLING_OPTIONS
0063 #ifdef NVTX_DISABLE
0064 (void)device;
0065 (void)name;
0066 #else
0067 nvtxNameCudaDeviceW_impl_fntype local = NVTX_VERSIONED_IDENTIFIER(nvtxGlobals).nvtxNameCudaDeviceW_impl_fnptr;
0068 if (local != NVTX_NULLPTR)
0069 (*local)(device, name);
0070 #endif
0071 }
0072
0073 NVTX_DECLSPEC void NVTX_API nvtxNameCudaStreamA(cudaStream_t stream, const char* name)
0074 {
0075 NVTX_SET_NAME_MANGLING_OPTIONS
0076 #ifdef NVTX_DISABLE
0077 (void)stream;
0078 (void)name;
0079 #else
0080 nvtxNameCudaStreamA_impl_fntype local = NVTX_REINTERPRET_CAST(nvtxNameCudaStreamA_impl_fntype, NVTX_VERSIONED_IDENTIFIER(nvtxGlobals).nvtxNameCudaStreamA_impl_fnptr);
0081 if (local != NVTX_NULLPTR)
0082 (*local)(stream, name);
0083 #endif
0084 }
0085
0086 NVTX_DECLSPEC void NVTX_API nvtxNameCudaStreamW(cudaStream_t stream, const wchar_t* name)
0087 {
0088 NVTX_SET_NAME_MANGLING_OPTIONS
0089 #ifdef NVTX_DISABLE
0090 (void)stream;
0091 (void)name;
0092 #else
0093 nvtxNameCudaStreamW_impl_fntype local = NVTX_REINTERPRET_CAST(nvtxNameCudaStreamW_impl_fntype, NVTX_VERSIONED_IDENTIFIER(nvtxGlobals).nvtxNameCudaStreamW_impl_fnptr);
0094 if (local != NVTX_NULLPTR)
0095 (*local)(stream, name);
0096 #endif
0097 }
0098
0099 NVTX_DECLSPEC void NVTX_API nvtxNameCudaEventA(cudaEvent_t event, const char* name)
0100 {
0101 NVTX_SET_NAME_MANGLING_OPTIONS
0102 #ifdef NVTX_DISABLE
0103 (void)event;
0104 (void)name;
0105 #else
0106 nvtxNameCudaEventA_impl_fntype local = NVTX_REINTERPRET_CAST(nvtxNameCudaEventA_impl_fntype, NVTX_VERSIONED_IDENTIFIER(nvtxGlobals).nvtxNameCudaEventA_impl_fnptr);
0107 if (local != NVTX_NULLPTR)
0108 (*local)(event, name);
0109 #endif
0110 }
0111
0112 NVTX_DECLSPEC void NVTX_API nvtxNameCudaEventW(cudaEvent_t event, const wchar_t* name)
0113 {
0114 NVTX_SET_NAME_MANGLING_OPTIONS
0115 #ifdef NVTX_DISABLE
0116 (void)event;
0117 (void)name;
0118 #else
0119 nvtxNameCudaEventW_impl_fntype local = NVTX_REINTERPRET_CAST(nvtxNameCudaEventW_impl_fntype, NVTX_VERSIONED_IDENTIFIER(nvtxGlobals).nvtxNameCudaEventW_impl_fnptr);
0120 if (local != NVTX_NULLPTR)
0121 (*local)(event, name);
0122 #endif
0123 }
0124
0125 #ifdef __cplusplus
0126 }
0127 #endif
0128