| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
|
|
| #if !defined(__CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS__)
|
| #if defined(_MSC_VER)
|
| #pragma message("crt/host_defines.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_defines.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_DEFINES_H__
|
| #endif
|
|
|
| #if !defined(__HOST_DEFINES_H__)
|
| #define __HOST_DEFINES_H__
|
|
|
| #if defined(__CUDACC__) && !defined(__CUDACC_RTC__) && !defined(__CUDADEVRT_INTERNAL__) && !defined(_ALLOW_UNSUPPORTED_LIBCPP)
|
| #include <ctype.h>
|
| #if ((defined(_MSC_VER ) && (defined(_M_X64) || defined(_M_AMD64))) ||\
|
| (defined(__x86_64__) || defined(__amd64__))) && defined(_LIBCPP_VERSION) && !(defined(__HORIZON__) || defined(__ANDROID__) || defined(__QNX__))
|
| #error "libc++ is not supported on x86 system"
|
| #endif
|
| #endif
|
|
|
|
|
| #if defined(__GNUC__) || (defined(__PGIC__) && defined(__linux__)) || defined(__CUDA_LIBDEVICE__) || defined(__CUDACC_RTC__)
|
|
|
| #if defined(__CUDACC_RTC__)
|
| #define __volatile__ volatile
|
| #endif
|
|
|
| #define __no_return__ \
|
| __attribute__((noreturn))
|
|
|
| #if defined(__CUDACC__) || defined(__CUDA_ARCH__) || defined(__CUDA_LIBDEVICE__)
|
| |
| |
| |
| |
| |
| |
| |
|
|
| #define __noinline__ \
|
| __attribute__((noinline))
|
| #endif
|
|
|
| #undef __forceinline__
|
| #define __forceinline__ \
|
| __inline__ __attribute__((always_inline))
|
| #define __inline_hint__ \
|
| __attribute__((nv_inline_hint))
|
| #define __align__(n) \
|
| __attribute__((aligned(n)))
|
| #define __maxnreg__(a) \
|
| __attribute__((maxnreg(a)))
|
| #define __thread__ \
|
| __thread
|
| #define __import__
|
| #define __export__
|
| #define __cdecl
|
| #define __annotate__(a) \
|
| __attribute__((a))
|
| #define __location__(a) \
|
| __annotate__(a)
|
| #define CUDARTAPI
|
| #define CUDARTAPI_CDECL
|
|
|
| #elif defined(_MSC_VER)
|
|
|
| #if _MSC_VER >= 1400
|
|
|
| #define __restrict__ \
|
| __restrict
|
|
|
| #else
|
|
|
| #define __restrict__
|
|
|
| #endif
|
|
|
| #define __inline__ \
|
| __inline
|
| #define __no_return__ \
|
| __declspec(noreturn)
|
| #define __noinline__ \
|
| __declspec(noinline)
|
| #define __forceinline__ \
|
| __forceinline
|
| #define __inline_hint__ \
|
| __declspec(nv_inline_hint)
|
| #define __align__(n) \
|
| __declspec(align(n))
|
| #define __maxnreg__(n) \
|
| __declspec(maxnreg(n))
|
| #define __thread__ \
|
| __declspec(thread)
|
| #define __import__ \
|
| __declspec(dllimport)
|
| #define __export__ \
|
| __declspec(dllexport)
|
| #define __annotate__(a) \
|
| __declspec(a)
|
| #define __location__(a) \
|
| __annotate__(__##a##__)
|
| #define CUDARTAPI \
|
| __stdcall
|
| #define CUDARTAPI_CDECL \
|
| __cdecl
|
|
|
| #else
|
|
|
| #define __inline__
|
|
|
| #if !defined(__align__)
|
|
|
| #error --- !!! UNKNOWN COMPILER: please provide a CUDA compatible definition for '__align__' !!! ---
|
|
|
| #endif
|
|
|
| #if !defined(CUDARTAPI)
|
|
|
| #error --- !!! UNKNOWN COMPILER: please provide a CUDA compatible definition for 'CUDARTAPI' !!! ---
|
|
|
| #endif
|
|
|
| #endif
|
|
|
| #if (defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3 && !defined(__clang__)))) || \
|
| (defined(_MSC_VER) && _MSC_VER < 1900) || \
|
| (!defined(__GNUC__) && !defined(_MSC_VER))
|
|
|
| #define __specialization_static \
|
| static
|
|
|
| #else |
| |
|
|
|
|
| #define __specialization_static
|
|
|
| #endif |
| |
|
|
|
|
| #if !defined(__CUDACC__) && !defined(__CUDA_LIBDEVICE__)
|
|
|
| #undef __annotate__
|
| #define __annotate__(a)
|
|
|
| #else
|
|
|
| #define __launch_bounds__(...) \
|
| __annotate__(launch_bounds(__VA_ARGS__))
|
|
|
| #endif
|
|
|
| #if defined(__CUDACC__) || defined(__CUDA_LIBDEVICE__) || \
|
| defined(__GNUC__) || defined(_WIN64)
|
|
|
| #define __builtin_align__(a) \
|
| __align__(a)
|
|
|
| #else
|
|
|
| #define __builtin_align__(a)
|
|
|
| #endif
|
|
|
| #if defined(__CUDACC__) || !defined(__grid_constant__)
|
| #define __grid_constant__ \
|
| __location__(grid_constant)
|
| #endif
|
|
|
| #if defined(__CUDACC__) || !defined(__host__)
|
| #define __host__ \
|
| __location__(host)
|
| #endif
|
| #if defined(__CUDACC__) || !defined(__device__)
|
| #define __device__ \
|
| __location__(device)
|
| #endif
|
| #if defined(__CUDACC__) || !defined(__global__)
|
| #define __global__ \
|
| __location__(global)
|
| #endif
|
| #if defined(__CUDACC__) || !defined(__shared__)
|
| #define __shared__ \
|
| __location__(shared)
|
| #endif
|
| #if defined(__CUDACC__) || !defined(__constant__)
|
| #define __constant__ \
|
| __location__(constant)
|
| #endif
|
| #if defined(__CUDACC__) || !defined(__managed__)
|
| #define __managed__ \
|
| __location__(managed)
|
| #endif
|
|
|
| #if !defined(__CUDACC__)
|
| #define __device_builtin__
|
| #define __device_builtin_texture_type__
|
| #define __device_builtin_surface_type__
|
| #define __cudart_builtin__
|
| #else
|
| #define __device_builtin__ \
|
| __location__(device_builtin)
|
| #define __device_builtin_texture_type__ \
|
| __location__(device_builtin_texture_type)
|
| #define __device_builtin_surface_type__ \
|
| __location__(device_builtin_surface_type)
|
| #define __cudart_builtin__ \
|
| __location__(cudart_builtin)
|
| #endif
|
|
|
| #if defined(__CUDACC__) || !defined(__cluster_dims__)
|
| #if defined(_MSC_VER)
|
| #define __cluster_dims__(...) \
|
| __declspec(__cluster_dims__(__VA_ARGS__))
|
|
|
| #else
|
| #define __cluster_dims__(...) \
|
| __attribute__((cluster_dims(__VA_ARGS__)))
|
| #endif
|
| #endif
|
|
|
| #define __CUDA_ARCH_HAS_FEATURE__(_FEAT) __CUDA_ARCH_FEAT_##_FEAT
|
|
|
| #endif
|
|
|
| #if defined(__UNDEF_CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS_HOST_DEFINES_H__)
|
| #undef __CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS__
|
| #undef __UNDEF_CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS_HOST_DEFINES_H__
|
| #endif
|
|
|