11 #ifndef __has_attribute
12 #define __has_attribute(x) 0
16 #define __has_builtin(x) 0
19 #ifndef __SYCL_ALWAYS_INLINE
20 #if __has_attribute(always_inline)
21 #define __SYCL_ALWAYS_INLINE __attribute__((always_inline))
23 #define __SYCL_ALWAYS_INLINE
28 #define __DPCPP_SYCL_EXTERNAL SYCL_EXTERNAL
30 #ifdef __SYCL_DEVICE_ONLY__
31 #define __DPCPP_SYCL_EXTERNAL __attribute__((sycl_device))
33 #define __DPCPP_SYCL_EXTERNAL
38 #ifndef __SYCL_ID_QUERIES_FIT_IN_INT__
39 #define __SYCL_ID_QUERIES_FIT_IN_INT__ 0
42 #ifndef __SYCL_DEPRECATED
43 #if !defined(SYCL2020_DISABLE_DEPRECATION_WARNINGS)
44 #define __SYCL_DEPRECATED(message) [[deprecated(message)]]
46 #define __SYCL_DEPRECATED(message)
50 #ifndef __SYCL2020_DEPRECATED
51 #if SYCL_LANGUAGE_VERSION >= 202001 && \
52 !defined(SYCL2020_DISABLE_DEPRECATION_WARNINGS)
53 #define __SYCL2020_DEPRECATED(message) __SYCL_DEPRECATED(message)
55 #define __SYCL2020_DEPRECATED(message)
59 #ifndef __SYCL_WARN_IMAGE_ASPECT
60 #if !defined(SYCL_DISABLE_IMAGE_ASPECT_WARNING) && __has_attribute(diagnose_if)
61 #define __SYCL_WARN_IMAGE_ASPECT(aspect_param) \
62 __attribute__((diagnose_if( \
63 aspect_param == aspect::image, \
64 "SYCL 2020 images are not supported on any devices. Consider using " \
65 "‘aspect::ext_intel_legacy_image’ instead. Disable this warning with " \
66 "by defining SYCL_DISABLE_IMAGE_ASPECT_WARNING.", \
69 #define __SYCL_WARN_IMAGE_ASPECT(aspect)
73 #ifndef __SYCL_HAS_CPP_ATTRIBUTE
74 #if defined(__cplusplus) && defined(__has_cpp_attribute)
75 #define __SYCL_HAS_CPP_ATTRIBUTE(x) __has_cpp_attribute(x)
77 #define __SYCL_HAS_CPP_ATTRIBUTE(x) 0
81 static_assert(__cplusplus >= 201703L,
82 "DPCPP does not support C++ version earlier than C++17.");
85 #if defined(SYCL_FALLBACK_ASSERT)
86 #define __SYCL_USE_FALLBACK_ASSERT SYCL_FALLBACK_ASSERT
88 #define __SYCL_USE_FALLBACK_ASSERT 0
91 #if defined(_WIN32) && !defined(_DLL) && !defined(__SYCL_DEVICE_ONLY__)
102 #if defined(_MSC_VER)
104 "SYCL library is designed to work safely with dynamic C++ runtime." \
105 "Please use /MD switch with sycl.dll, /MDd switch with sycld.dll, " \
106 "or -fsycl switch to set C++ runtime automatically.")
108 #warning "SYCL library is designed to work safely with dynamic C++ runtime."\
109 "Please use /MD switch with sycl.dll, /MDd switch with sycld.dll, "\
110 "or -fsycl switch to set C++ runtime automatically."