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_EXT_IMPL_GUARD
0022 #error Never include this file directly -- it is automatically included by nvToolsExt.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 #ifndef NVTX_EXT_IMPL_H
0036 #define NVTX_EXT_IMPL_H
0037
0038 #include <stdlib.h>
0039 #include <stdio.h>
0040 #include <string.h>
0041 #include <wchar.h>
0042
0043
0044
0045 #if defined(_WIN32)
0046
0047 #include <windows.h>
0048
0049 #else
0050 #include <unistd.h>
0051
0052 #if defined(__ANDROID__)
0053 #include <android/api-level.h>
0054 #endif
0055
0056 #if defined(__linux__) || defined(__CYGWIN__)
0057 #include <sched.h>
0058 #endif
0059
0060 #include <sys/types.h>
0061 #include <limits.h>
0062 #include <dlfcn.h>
0063 #include <fcntl.h>
0064 #include <errno.h>
0065 #include <pthread.h>
0066
0067 #endif
0068
0069
0070
0071 #ifdef NVTX_DEBUG_PRINT
0072 #ifdef __ANDROID__
0073 #include <android/log.h>
0074 #define NVTX_ERR(...) __android_log_print(ANDROID_LOG_ERROR, "NVTOOLSEXT", __VA_ARGS__);
0075 #define NVTX_INFO(...) __android_log_print(ANDROID_LOG_INFO, "NVTOOLSEXT", __VA_ARGS__);
0076 #else
0077 #include <stdio.h>
0078 #define NVTX_ERR(...) fprintf(stderr, "NVTX_ERROR: " __VA_ARGS__)
0079 #define NVTX_INFO(...) fprintf(stderr, "NVTX_INFO: " __VA_ARGS__)
0080 #endif
0081 #else
0082 #define NVTX_ERR(...)
0083 #define NVTX_INFO(...)
0084 #endif
0085
0086 #ifdef __cplusplus
0087 extern "C" {
0088 #endif
0089
0090 #ifdef __GNUC__
0091 #pragma GCC visibility push(hidden)
0092 #endif
0093
0094 #define NVTX_EXTENSION_FRESH 0
0095 #define NVTX_EXTENSION_DISABLED 1
0096 #define NVTX_EXTENSION_STARTING 2
0097 #define NVTX_EXTENSION_LOADED 3
0098 #define NVTX_EXTENSION_INIT_FN_FAILED 4
0099
0100
0101 typedef struct nvtxExtGlobals1_t
0102 {
0103 NvtxExtInitializeInjectionFunc_t injectionFnPtr;
0104 } nvtxExtGlobals1_t;
0105
0106 NVTX_LINKONCE_DEFINE_GLOBAL nvtxExtGlobals1_t NVTX_VERSIONED_IDENTIFIER(nvtxExtGlobals1) =
0107 {
0108 NVTX_NULLPTR
0109 };
0110
0111 #define NVTX_EXT_INIT_GUARD
0112 #include "nvtxExtInit.h"
0113 #undef NVTX_EXT_INIT_GUARD
0114
0115 #ifdef __GNUC__
0116 #pragma GCC visibility pop
0117 #endif
0118
0119 #ifdef __cplusplus
0120 }
0121 #endif
0122
0123 #endif