| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
|
|
| #if !defined(__CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS__)
|
| #if defined(_MSC_VER)
|
| #pragma message("crt/host_config.h is an internal header file and must not be used directly. Please use cuda_runtime_api.h or cuda_runtime.h instead.")
|
| #else
|
| #warning "crt/host_config.h is an internal header file and must not be used directly. Please use cuda_runtime_api.h or cuda_runtime.h instead."
|
| #endif
|
| #define __CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS__
|
| #define __UNDEF_CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS_HOST_CONFIG_H__
|
| #endif
|
|
|
| #if !defined(__HOST_CONFIG_H__)
|
| #define __HOST_CONFIG_H__
|
|
|
| |
| |
| |
| |
|
|
|
|
| #if defined(__CUDACC__)
|
|
|
| #if defined(__CUDACC_RTC__)
|
|
|
| #define _CRTIMP
|
| #define __THROW
|
|
|
| #else
|
|
|
|
|
| #if !defined(__GNUC__) && !defined(_WIN32)
|
|
|
| #error --- !!! UNSUPPORTED COMPILER !!! ---
|
|
|
| #endif
|
|
|
|
|
| #if defined(__PGIC__)
|
| #if !defined(__GNUC__) || !defined(__LP64__) || !defined(__linux__)
|
| #error -- unsupported pgc++ configuration! pgc++ is supported only on Linux x86_64!
|
| #endif
|
| #endif
|
|
|
| #if defined(__powerpc__)
|
| #if !defined(__powerpc64__) || !defined(__LITTLE_ENDIAN__)
|
| #error -- unsupported PPC platform! Only 64-bit little endian PPC is supported!
|
| #endif
|
| #endif
|
|
|
| #if defined(__APPLE__) && defined(__MACH__) && !defined(__clang__)
|
| #error -- clang and clang++ are the only supported host compilers on Mac OS X!
|
| #endif
|
|
|
|
|
|
|
| #if !__NV_NO_HOST_COMPILER_CHECK
|
|
|
| #if defined(__ICC)
|
|
|
| #if (__ICC != 1500 && __ICC != 1600 && __ICC != 1700 && __ICC != 1800 && !(__ICC >= 1900 && __ICC <= 2021)) || !defined(__GNUC__) || !defined(__LP64__)
|
|
|
| #error -- unsupported ICC configuration! Only ICC 15.0, ICC 16.0, ICC 17.0, ICC 18.0, ICC 19.x and 20.x on Linux x86_64 are supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
|
|
|
| #endif
|
|
|
| #endif
|
|
|
| #if defined(__GRCO_CLANG_COMPILER__)
|
| #if (__GRCO_CLANG_COMPILER__ == 1) && ((__clang_major__ < 16) || (__clang_major__ > 17))
|
| #error -- unsupported Grace clang version! The version must be 16.x to 17.x. The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
|
| #endif
|
|
|
| #endif
|
|
|
| #if defined(__INTEL_CLANG_COMPILER)
|
| #error -- unsupported Intel ICX compiler! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
|
| #endif
|
|
|
| #if defined(__powerpc__)
|
|
|
| #if defined(__ibmxl_vrm__) && !(__ibmxl_vrm__ >= 0x0d010000 && __ibmxl_vrm__ < 0x0d020000) && \
|
| !(__ibmxl_vrm__ >= 0x10010000 && __ibmxl_vrm__ < 0x10020000)
|
|
|
| #error -- unsupported xlC version! only xlC 13.1 and 16.1 are supported. The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
|
|
|
| #endif |
|
|
|
|
| #endif
|
|
|
| #if defined(__GNUC__)
|
|
|
| #if __GNUC__ > 13
|
|
|
| #error -- unsupported GNU version! gcc versions later than 13 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
|
|
|
| #endif
|
|
|
|
|
| #if defined(__HORIZON__)
|
| #if (__clang_major__ >= 18) || (__clang_major__ < 3) || ((__clang_major__ == 3) && (__clang_minor__ < 3))
|
| #error -- unsupported HOS clang version! The version must be must be less than 18 and greater than 3.2 . The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
|
| #endif
|
| #endif
|
|
|
| #if defined(__clang__) && !defined(__ibmxl_vrm__) && !defined(__ICC) && !defined(__HORIZON__) && !defined(__APPLE__) && !defined(__GRCO_CLANG_COMPILER__)
|
|
|
| #if (__clang_major__ >= 18) || (__clang_major__ < 3) || ((__clang_major__ == 3) && (__clang_minor__ < 3))
|
| #error -- unsupported clang version! clang version must be less than 18 and greater than 3.2 . The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
|
|
|
| #endif
|
|
|
| #endif
|
|
|
|
|
| #endif
|
|
|
| #if defined(_WIN32)
|
|
|
| #if _MSC_VER < 1910 || _MSC_VER >= 1950
|
|
|
| #error -- unsupported Microsoft Visual Studio version! Only the versions between 2017 and 2022 (inclusive) are supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
|
|
|
| #elif _MSC_VER >= 1910 && _MSC_VER < 1910
|
|
|
| #pragma message("support for this version of Microsoft Visual Studio has been deprecated! Only the versions between 2017 and 2022 (inclusive) are supported!")
|
|
|
| #endif
|
|
|
| #endif
|
| #endif
|
|
|
|
|
|
|
| #if defined(__APPLE__)
|
|
|
| #define _CRTIMP
|
| #define _ACRTIMP
|
| #define __THROW
|
|
|
| #if defined(__BLOCKS__)
|
|
|
| #undef __BLOCKS__
|
|
|
| #endif
|
|
|
| #elif defined(__ANDROID__)
|
|
|
| #define _CRTIMP
|
| #define _ACRTIMP
|
| #define __THROW
|
|
|
| #elif defined(__QNX__)
|
|
|
| #define _CRTIMP
|
| #define _ACRTIMP
|
| #define __THROW
|
|
|
| #elif defined(__HORIZON__)
|
|
|
| #define _CRTIMP
|
| #define _ACRTIMP
|
| #define __THROW
|
|
|
| #elif defined(__GNUC__)
|
|
|
| #define _CRTIMP
|
| #define _ACRTIMP
|
|
|
| #include <features.h>
|
|
|
| #elif defined(_WIN32)
|
|
|
| #if _MSC_VER >= 1500
|
|
|
| #undef _USE_DECLSPECS_FOR_SAL
|
| #define _USE_DECLSPECS_FOR_SAL \
|
| 1
|
|
|
| #endif
|
|
|
| #if !defined(_CRT_NONSTDC_NO_WARNINGS)
|
|
|
| #define _CRT_NONSTDC_NO_WARNINGS
|
|
|
| #endif
|
|
|
| #if !defined(_CRT_SECURE_NO_WARNINGS)
|
|
|
| #define _CRT_SECURE_NO_WARNINGS
|
|
|
| #endif
|
|
|
| #if !defined(NOMINMAX)
|
|
|
| #define NOMINMAX
|
|
|
| #endif
|
|
|
| #include <crtdefs.h>
|
| #if _MSC_VER >= 1900
|
| #include <corecrt.h>
|
| #endif
|
|
|
| #define __THROW
|
|
|
| #endif
|
|
|
| #endif
|
|
|
|
|
| #if defined(__cplusplus) && defined(__CUDA_ARCH__) && (defined(__PGIC__) || defined(__CUDACC_RTC__) || (defined(_WIN32) && defined(_MSC_VER)))
|
|
|
| #if __CUDACC_RTC__
|
| typedef char *va_list;
|
| #else
|
| #include <cstdarg>
|
| #endif
|
|
|
|
|
| #undef va_start
|
| #undef va_end
|
| #undef va_arg
|
|
|
| #ifdef __PGIC__
|
|
|
| #undef __builtin_va_end
|
|
|
| #define va_start(v,l) __builtin_alt_va_start(v,l)
|
| #define va_end(v) __builtin_va_end(v)
|
| #define va_arg(v,l) __builtin_alt_va_arg(v,l)
|
|
|
| #if (__cplusplus >= 201103L)
|
| #undef va_copy
|
| #define va_copy(d,s) __builtin_va_copy(d,s)
|
| #endif
|
|
|
| #else
|
|
|
|
|
| #define va_start(ap, x) (__cu_va_start(&ap, x))
|
| #define va_end(ap) (__cu_va_end(&ap))
|
| #define va_arg(ap, t) (*((t *)__cu_va_arg(&ap, (t *)0)))
|
|
|
| #if (_MSC_VER >= 1800) || (defined(__CUDACC_RTC__) && (__cplusplus >= 201103L))
|
| #undef va_copy
|
| #define va_copy(apd, aps) (__cu_va_copy(&(apd), &(aps)))
|
| #endif
|
| #endif
|
|
|
| #endif
|
|
|
|
|
|
|
| #endif
|
|
|
| #endif
|
|
|
| #if defined(__UNDEF_CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS_HOST_CONFIG_H__)
|
| #undef __CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS__
|
| #undef __UNDEF_CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS_HOST_CONFIG_H__
|
| #endif
|
|
|