From e059715e040b894da5e5c0ae7621d13787c1c180 Mon Sep 17 00:00:00 2001 From: Michael Schellenberger Costa Date: Sun, 17 Nov 2024 18:14:34 +0100 Subject: [PATCH] Move `_CCCL_COMPILER_ICC` to the new macro --- cub/cub/util_macro.cuh | 4 ++-- cub/cub/util_type.cuh | 2 +- .../cuda/experimental/__detail/config.cuh | 6 +++--- libcudacxx/include/cuda/std/__cccl/assert.h | 6 +++--- libcudacxx/include/cuda/std/__cccl/compiler.h | 2 +- .../include/cuda/std/__cccl/diagnostic.h | 10 +++++----- libcudacxx/include/cuda/std/__cccl/rtti.h | 4 ++-- .../include/cuda/std/__cccl/system_header.h | 4 ++-- .../include/cuda/std/__cccl/visibility.h | 6 +++--- .../cuda/std/detail/libcxx/include/__config | 2 +- .../cuda/std/detail/libcxx/include/cmath | 18 +++++++++--------- .../test/libcudacxx/cuda/type_list.pass.cpp | 2 +- thrust/testing/async_copy.cu | 4 ++-- thrust/testing/scan.cu | 2 +- thrust/thrust/complex.h | 10 +++++----- thrust/thrust/detail/config/compiler.h | 2 +- 16 files changed, 42 insertions(+), 42 deletions(-) diff --git a/cub/cub/util_macro.cuh b/cub/cub/util_macro.cuh index af9977ece7b..f98751b2ddf 100644 --- a/cub/cub/util_macro.cuh +++ b/cub/cub/util_macro.cuh @@ -112,12 +112,12 @@ _CCCL_DIAG_SUPPRESS_CLANG("-Wattributes") # if !defined(_CCCL_CUDA_COMPILER_NVHPC) _CCCL_DIAG_SUPPRESS_NVHPC(attribute_requires_external_linkage) # endif // !_CCCL_CUDA_COMPILER_NVHPC -# if defined(_CCCL_COMPILER_ICC) +# if _CCCL_COMPILER(ICC) # pragma nv_diag_suppress 1407 // the "__visibility__" attribute can only appear on functions and // variables with external linkage' # pragma warning(disable : 1890) // the "__visibility__" attribute can only appear on functions and // variables with external linkage' -# endif // _CCCL_COMPILER_ICC +# endif // _CCCL_COMPILER(ICC) #endif // !CUB_DISABLE_KERNEL_VISIBILITY_WARNING_SUPPRESSION #ifndef CUB_DEFINE_KERNEL_GETTER diff --git a/cub/cub/util_type.cuh b/cub/cub/util_type.cuh index 8935ff3e17b..9fe415c83d6 100644 --- a/cub/cub/util_type.cuh +++ b/cub/cub/util_type.cuh @@ -74,7 +74,7 @@ CUB_NAMESPACE_BEGIN # endif // !defined(__CUDACC_RTC_INT128__) # else // !defined(__CUDACC_RTC__) # if _CCCL_CUDACC_AT_LEAST(11, 5) -# if defined(_CCCL_COMPILER_GCC) || defined(_CCCL_COMPILER_CLANG) || defined(_CCCL_COMPILER_ICC) \ +# if defined(_CCCL_COMPILER_GCC) || defined(_CCCL_COMPILER_CLANG) || _CCCL_COMPILER(ICC) \ || _CCCL_COMPILER(NVHPC) # define CUB_IS_INT128_ENABLED 1 # endif // GCC || CLANG || ICC || NVHPC diff --git a/cudax/include/cuda/experimental/__detail/config.cuh b/cudax/include/cuda/experimental/__detail/config.cuh index 5c434c30605..6f009d3a4e9 100644 --- a/cudax/include/cuda/experimental/__detail/config.cuh +++ b/cudax/include/cuda/experimental/__detail/config.cuh @@ -35,15 +35,15 @@ // two attributes: // - `_CUDAX_API` declares the function host/device and hides the symbol from the ABI // - `_CUDAX_TRIVIAL_API` does the same while also forcing inlining and hiding the function from debuggers -#if defined(_CCCL_COMPILER_ICC) // ICC has issues with visibility attributes on symbols with internal linkage +#if _CCCL_COMPILER(ICC) // ICC has issues with visibility attributes on symbols with internal linkage # define _CUDAX_API _CCCL_HOST_DEVICE # define _CUDAX_HOST_API _CCCL_HOST # define _CUDAX_DEVICE_API _CCCL_DEVICE -#else // ^^^ _CCCL_COMPILER_ICC ^^^ / vvv !_CCCL_COMPILER_ICC vvv +#else // ^^^ _CCCL_COMPILER(ICC) ^^^ / vvv !_CCCL_COMPILER(ICC) vvv # define _CUDAX_API _CCCL_HOST_DEVICE _CCCL_VISIBILITY_HIDDEN _CCCL_EXCLUDE_FROM_EXPLICIT_INSTANTIATION # define _CUDAX_HOST_API _CCCL_HOST _CCCL_VISIBILITY_HIDDEN _CCCL_EXCLUDE_FROM_EXPLICIT_INSTANTIATION # define _CUDAX_DEVICE_API _CCCL_DEVICE _CCCL_VISIBILITY_HIDDEN _CCCL_EXCLUDE_FROM_EXPLICIT_INSTANTIATION -#endif // !_CCCL_COMPILER_ICC +#endif // !_CCCL_COMPILER(ICC) // _CUDAX_TRIVIAL_API force-inlines a function, marks its visibility as hidden, and causes debuggers to skip it. // This is useful for trivial internal functions that do dispatching or other plumbing work. It is particularly diff --git a/libcudacxx/include/cuda/std/__cccl/assert.h b/libcudacxx/include/cuda/std/__cccl/assert.h index ea9d4f8527a..70b2398cccf 100644 --- a/libcudacxx/include/cuda/std/__cccl/assert.h +++ b/libcudacxx/include/cuda/std/__cccl/assert.h @@ -80,14 +80,14 @@ _CCCL_HOST_DEVICE } # endif // NDEBUG // ICC cannot deal with `__builtin_expect` in the constexpr evaluator, so just drop it -# if defined(_CCCL_COMPILER_ICC) +# if _CCCL_COMPILER(ICC) # define _CCCL_ASSERT_IMPL_HOST(expression, message) \ static_cast(expression) ? (void) 0 : __assert_fail(message, __FILE__, __LINE__, __func__); -# else // ^^^ _CCCL_COMPILER_ICC ^^^ / vvv !_CCCL_COMPILER_ICC vvv +# else // ^^^ _CCCL_COMPILER(ICC) ^^^ / vvv !_CCCL_COMPILER(ICC) vvv # define _CCCL_ASSERT_IMPL_HOST(expression, message) \ _CCCL_BUILTIN_EXPECT(static_cast(expression), 1) \ ? (void) 0 : __assert_fail(message, __FILE__, __LINE__, __func__) -# endif // !_CCCL_COMPILER_ICC +# endif // !_CCCL_COMPILER(ICC) #endif // !MSVC STL //! Use custom implementations with nvcc on device and the host ones with clang-cuda and nvhpc diff --git a/libcudacxx/include/cuda/std/__cccl/compiler.h b/libcudacxx/include/cuda/std/__cccl/compiler.h index 8f0d652ed2e..2db972f03d1 100644 --- a/libcudacxx/include/cuda/std/__cccl/compiler.h +++ b/libcudacxx/include/cuda/std/__cccl/compiler.h @@ -15,7 +15,7 @@ // Determine the host compiler and its version #if defined(__INTEL_COMPILER) -# define _CCCL_COMPILER_ICC +# define _CCCL_COMPILER_ICC 1 # ifndef CCCL_SUPPRESS_ICC_DEPRECATION_WARNING # warning \ "Support for the Intel C++ Compiler Classic is deprecated and will eventually be removed. Define CCCL_SUPPRESS_ICC_DEPRECATION_WARNING to suppress this warning" diff --git a/libcudacxx/include/cuda/std/__cccl/diagnostic.h b/libcudacxx/include/cuda/std/__cccl/diagnostic.h index bcf12a30fce..20abe1b3ec1 100644 --- a/libcudacxx/include/cuda/std/__cccl/diagnostic.h +++ b/libcudacxx/include/cuda/std/__cccl/diagnostic.h @@ -39,7 +39,7 @@ # define _CCCL_DIAG_SUPPRESS_NVHPC(str) # define _CCCL_DIAG_SUPPRESS_MSVC(str) # define _CCCL_DIAG_SUPPRESS_ICC(str) -#elif defined(_CCCL_COMPILER_ICC) +#elif _CCCL_COMPILER(ICC) # define _CCCL_DIAG_PUSH _CCCL_PRAGMA(GCC diagnostic push) # define _CCCL_DIAG_POP _CCCL_PRAGMA(GCC diagnostic pop) # define _CCCL_DIAG_SUPPRESS_CLANG(str) @@ -80,7 +80,7 @@ _CCCL_DIAG_SUPPRESS_CLANG("-Wdeprecated") \ _CCCL_DIAG_SUPPRESS_CLANG("-Wdeprecated-declarations") # define _CCCL_SUPPRESS_DEPRECATED_POP _CCCL_DIAG_POP -#elif defined(_CCCL_COMPILER_ICC) +#elif _CCCL_COMPILER(ICC) # define _CCCL_SUPPRESS_DEPRECATED_PUSH \ _CCCL_DIAG_PUSH \ _CCCL_DIAG_SUPPRESS_ICC(1478) @@ -101,11 +101,11 @@ _CCCL_DIAG_PUSH \ _CCCL_DIAG_SUPPRESS_MSVC(4996) # define _CCCL_SUPPRESS_DEPRECATED_POP _CCCL_DIAG_POP -#else // !_CCCL_COMPILER_CLANG && !_CCCL_COMPILER_ICC && && !_CCCL_COMPILER_GCC && !_CCCL_COMPILER(NVHPC) && +#else // !_CCCL_COMPILER_CLANG && !_CCCL_COMPILER(ICC) && && !_CCCL_COMPILER_GCC && !_CCCL_COMPILER(NVHPC) && // !_CCCL_COMPILER_MSVC # define _CCCL_SUPPRESS_DEPRECATED_PUSH # define _CCCL_SUPPRESS_DEPRECATED_POP -#endif // !_CCCL_COMPILER_CLANG && !_CCCL_COMPILER_ICC && && !_CCCL_COMPILER_GCC && !_CCCL_COMPILER(NVHPC) && +#endif // !_CCCL_COMPILER_CLANG && !_CCCL_COMPILER(ICC) && && !_CCCL_COMPILER_GCC && !_CCCL_COMPILER(NVHPC) && // !_CCCL_COMPILER_MSVC // Enable us to selectively silence cuda compiler warnings @@ -113,7 +113,7 @@ # if defined(_CCCL_CUDA_COMPILER_CLANG) # define _CCCL_NV_DIAG_SUPPRESS(_WARNING) # define _CCCL_NV_DIAG_DEFAULT(_WARNING) -# elif defined(__NVCC_DIAG_PRAGMA_SUPPORT__) || defined(_CCCL_COMPILER_ICC) +# elif defined(__NVCC_DIAG_PRAGMA_SUPPORT__) || _CCCL_COMPILER(ICC) # if defined(_CCCL_COMPILER_MSVC) # define _CCCL_NV_DIAG_SUPPRESS(_WARNING) _CCCL_PRAGMA(nv_diag_suppress _WARNING) # define _CCCL_NV_DIAG_DEFAULT(_WARNING) _CCCL_PRAGMA(nv_diag_default _WARNING) diff --git a/libcudacxx/include/cuda/std/__cccl/rtti.h b/libcudacxx/include/cuda/std/__cccl/rtti.h index 50b6fbbf0e3..80f216ef0d6 100644 --- a/libcudacxx/include/cuda/std/__cccl/rtti.h +++ b/libcudacxx/include/cuda/std/__cccl/rtti.h @@ -32,7 +32,7 @@ # define _CCCL_NO_RTTI # elif defined(__CUDA_ARCH__) # define _CCCL_NO_RTTI // No RTTI in CUDA device code -# elif defined(_CCCL_COMPILER_ICC) +# elif _CCCL_COMPILER(ICC) # if __RTTI == 0 && __INTEL_RTTI__ == 0 && __GXX_RTTI == 0 && _CPPRTTI == 0 # define _CCCL_NO_RTTI # endif @@ -58,7 +58,7 @@ # define _CCCL_NO_TYPEID # elif defined(__CUDA_ARCH__) # define _CCCL_NO_TYPEID // No typeid in CUDA device code -# elif defined(_CCCL_COMPILER_ICC) +# elif _CCCL_COMPILER(ICC) // when emulating MSVC, typeid is available even when RTTI is disabled # if !defined(_MSC_VER) && __RTTI == 0 && __INTEL_RTTI__ == 0 && __GXX_RTTI == 0 && _CPPRTTI == 0 # define _CCCL_NO_TYPEID diff --git a/libcudacxx/include/cuda/std/__cccl/system_header.h b/libcudacxx/include/cuda/std/__cccl/system_header.h index d26ccddddd6..067e6e5b9e8 100644 --- a/libcudacxx/include/cuda/std/__cccl/system_header.h +++ b/libcudacxx/include/cuda/std/__cccl/system_header.h @@ -15,7 +15,7 @@ #include // IWYU pragma: export // Enforce that cccl headers are treated as system headers -#if defined(_CCCL_COMPILER_GCC) || _CCCL_COMPILER(NVHPC) || defined(_CCCL_COMPILER_ICC) +#if defined(_CCCL_COMPILER_GCC) || _CCCL_COMPILER(NVHPC) || _CCCL_COMPILER(ICC) # define _CCCL_FORCE_SYSTEM_HEADER_GCC #elif defined(_CCCL_COMPILER_CLANG) # define _CCCL_FORCE_SYSTEM_HEADER_CLANG @@ -27,7 +27,7 @@ #if !defined(_CCCL_NO_SYSTEM_HEADER) \ && !(defined(_CCCL_COMPILER_MSVC) && defined(_LIBCUDACXX_DISABLE_PRAGMA_MSVC_WARNING)) && !_CCCL_COMPILER(NVRTC) \ && !defined(_LIBCUDACXX_DISABLE_PRAGMA_GCC_SYSTEM_HEADER) -# if defined(_CCCL_COMPILER_GCC) || _CCCL_COMPILER(NVHPC) || defined(_CCCL_COMPILER_ICC) +# if defined(_CCCL_COMPILER_GCC) || _CCCL_COMPILER(NVHPC) || _CCCL_COMPILER(ICC) # define _CCCL_IMPLICIT_SYSTEM_HEADER_GCC # elif defined(_CCCL_COMPILER_CLANG) # define _CCCL_IMPLICIT_SYSTEM_HEADER_CLANG diff --git a/libcudacxx/include/cuda/std/__cccl/visibility.h b/libcudacxx/include/cuda/std/__cccl/visibility.h index b994b3d627d..ad35694a448 100644 --- a/libcudacxx/include/cuda/std/__cccl/visibility.h +++ b/libcudacxx/include/cuda/std/__cccl/visibility.h @@ -72,13 +72,13 @@ # define _CCCL_EXCLUDE_FROM_EXPLICIT_INSTANTIATION #endif // !exclude_from_explicit_instantiation -#if defined(_CCCL_COMPILER_ICC) // ICC has issues with visibility attributes on symbols with internal linkage +#if _CCCL_COMPILER(ICC) // ICC has issues with visibility attributes on symbols with internal linkage # define _CCCL_HIDE_FROM_ABI inline #elif _CCCL_COMPILER(NVHPC) // NVHPC has issues with visibility attributes on symbols with internal linkage # define _CCCL_HIDE_FROM_ABI inline -#else // ^^^ _CCCL_COMPILER_ICC ^^^ / vvv !_CCCL_COMPILER_ICC vvv +#else // ^^^ _CCCL_COMPILER(ICC) ^^^ / vvv !_CCCL_COMPILER(ICC) vvv # define _CCCL_HIDE_FROM_ABI _CCCL_VISIBILITY_HIDDEN _CCCL_EXCLUDE_FROM_EXPLICIT_INSTANTIATION inline -#endif // !_CCCL_COMPILER_ICC +#endif // !_CCCL_COMPILER(ICC) //! Defined here to supress any warnings from the definition #define _LIBCUDACXX_HIDE_FROM_ABI _CCCL_HIDE_FROM_ABI _CCCL_HOST_DEVICE diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__config b/libcudacxx/include/cuda/std/detail/libcxx/include/__config index e482dbd7e2e..8c4d3e6775c 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__config +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__config @@ -742,7 +742,7 @@ typedef unsigned int char32_t; // TODO: Support C11 Atomics? // #if _CCCL_HAS_FEATURE(cxx_atomic) || __has_extension(c_atomic) || _CCCL_HAS_KEYWORD(_Atomic) // # define _LIBCUDACXX_HAS_C_ATOMIC_IMP -# if defined(_CCCL_COMPILER_ICC) +# if _CCCL_COMPILER(ICC) # define _LIBCUDACXX_HAS_GCC_ATOMIC_IMP # elif defined(_CCCL_COMPILER_CLANG) # define _LIBCUDACXX_HAS_GCC_ATOMIC_IMP diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/cmath b/libcudacxx/include/cuda/std/detail/libcxx/include/cmath index 570abad3e11..aa665279310 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/cmath +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/cmath @@ -756,11 +756,11 @@ _LIBCUDACXX_HIDE_FROM_ABI _A1 __constexpr_fmax(_A1 __x, _A1 __y) noexcept _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14_COMPLEX float __constexpr_fmax(float __x, float __y) noexcept { # if defined(_CCCL_BUILTIN_IS_CONSTANT_EVALUATED) && !defined(_LIBCUDACXX_HAS_NO_CONSTEXPR_COMPLEX_OPERATIONS) -# if defined(_CCCL_COMPILER_ICC) && _NV_ISEMPTY(_CCCL_CONSTEXPR_CXX14_COMPLEX) +# if _CCCL_COMPILER(ICC) && _NV_ISEMPTY(_CCCL_CONSTEXPR_CXX14_COMPLEX) if (false) -# else // defined(_CCCL_COMPILER_ICC) && _NV_ISEMPTY(_CCCL_CONSTEXPR_CXX14_COMPLEX) +# else // _CCCL_COMPILER(ICC) && _NV_ISEMPTY(_CCCL_CONSTEXPR_CXX14_COMPLEX) if (_CCCL_BUILTIN_IS_CONSTANT_EVALUATED()) -# endif // defined(_CCCL_COMPILER_ICC) && _NV_ISEMPTY(_CCCL_CONSTEXPR_CXX14_COMPLEX) +# endif // _CCCL_COMPILER(ICC) && _NV_ISEMPTY(_CCCL_CONSTEXPR_CXX14_COMPLEX) { if (__constexpr_isnan(__x)) { @@ -779,11 +779,11 @@ _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14_COMPLEX float __constexpr_fmax(f _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14_COMPLEX double __constexpr_fmax(double __x, double __y) noexcept { # if defined(_CCCL_BUILTIN_IS_CONSTANT_EVALUATED) && !defined(_LIBCUDACXX_HAS_NO_CONSTEXPR_COMPLEX_OPERATIONS) -# if defined(_CCCL_COMPILER_ICC) && _NV_ISEMPTY(_CCCL_CONSTEXPR_CXX14_COMPLEX) +# if _CCCL_COMPILER(ICC) && _NV_ISEMPTY(_CCCL_CONSTEXPR_CXX14_COMPLEX) if (false) -# else // defined(_CCCL_COMPILER_ICC) && _NV_ISEMPTY(_CCCL_CONSTEXPR_CXX14_COMPLEX) +# else // _CCCL_COMPILER(ICC) && _NV_ISEMPTY(_CCCL_CONSTEXPR_CXX14_COMPLEX) if (_CCCL_BUILTIN_IS_CONSTANT_EVALUATED()) -# endif // defined(_CCCL_COMPILER_ICC) && _NV_ISEMPTY(_CCCL_CONSTEXPR_CXX14_COMPLEX) +# endif // _CCCL_COMPILER(ICC) && _NV_ISEMPTY(_CCCL_CONSTEXPR_CXX14_COMPLEX) { if (__constexpr_isnan(__x)) { @@ -803,11 +803,11 @@ _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14_COMPLEX long double __constexpr_fmax(long double __x, long double __y) noexcept { # if defined(_CCCL_BUILTIN_IS_CONSTANT_EVALUATED) && !defined(_LIBCUDACXX_HAS_NO_CONSTEXPR_COMPLEX_OPERATIONS) -# if defined(_CCCL_COMPILER_ICC) && _NV_ISEMPTY(_CCCL_CONSTEXPR_CXX14_COMPLEX) +# if _CCCL_COMPILER(ICC) && _NV_ISEMPTY(_CCCL_CONSTEXPR_CXX14_COMPLEX) if (false) -# else // defined(_CCCL_COMPILER_ICC) && _NV_ISEMPTY(_CCCL_CONSTEXPR_CXX14_COMPLEX) +# else // _CCCL_COMPILER(ICC) && _NV_ISEMPTY(_CCCL_CONSTEXPR_CXX14_COMPLEX) if (_CCCL_BUILTIN_IS_CONSTANT_EVALUATED()) -# endif // defined(_CCCL_COMPILER_ICC) && _NV_ISEMPTY(_CCCL_CONSTEXPR_CXX14_COMPLEX) +# endif // _CCCL_COMPILER(ICC) && _NV_ISEMPTY(_CCCL_CONSTEXPR_CXX14_COMPLEX) { if (__constexpr_isnan(__x)) { diff --git a/libcudacxx/test/libcudacxx/cuda/type_list.pass.cpp b/libcudacxx/test/libcudacxx/cuda/type_list.pass.cpp index 5fb735dc2f8..2e477d3622a 100644 --- a/libcudacxx/test/libcudacxx/cuda/type_list.pass.cpp +++ b/libcudacxx/test/libcudacxx/cuda/type_list.pass.cpp @@ -16,7 +16,7 @@ #include #include -#if defined(_CCCL_COMPILER_ICC) || defined(_CCCL_CUDA_COMPILER_NVCC) || _CCCL_COMPILER(NVRTC) \ +#if _CCCL_COMPILER(ICC) || defined(_CCCL_CUDA_COMPILER_NVCC) || _CCCL_COMPILER(NVRTC) \ || defined(_CCCL_CUDA_COMPILER_CLANG) // These compilers have trouble making substitution failures during // alias template instantiation non-fatal. diff --git a/thrust/testing/async_copy.cu b/thrust/testing/async_copy.cu index 23c42568038..cf67652ac06 100644 --- a/thrust/testing/async_copy.cu +++ b/thrust/testing/async_copy.cu @@ -208,10 +208,10 @@ struct test_async_copy_counting_iterator_input_to_host_vector ASSERT_EQUAL(d0, d1); -# if defined(_CCCL_COMPILER_ICC) +# if _CCCL_COMPILER(ICC) // ICC fails this for some unknown reason - see #1468. KNOWN_FAILURE; -# endif +# endif // _CCCL_COMPILER(ICC) } }; }; diff --git a/thrust/testing/scan.cu b/thrust/testing/scan.cu index e657d637a57..171868ee602 100644 --- a/thrust/testing/scan.cu +++ b/thrust/testing/scan.cu @@ -30,7 +30,7 @@ void TestScanSimple() // The issue doesn't happen with opts disabled, or on other compilers. // Printing the intermediate sum each iteration "fixes" the issue, // so likely a bad optimization. -#if defined(_CCCL_COMPILER_ICC) +#if _CCCL_COMPILER(ICC) if (std::is_same::value) { return; diff --git a/thrust/thrust/complex.h b/thrust/thrust/complex.h index db2bb37d650..f3a2ef370fb 100644 --- a/thrust/thrust/complex.h +++ b/thrust/thrust/complex.h @@ -341,18 +341,18 @@ struct complex private: #if defined(_CCCL_CUDA_COMPILER_NVCC) && _CCCL_CUDACC_BELOW(11, 7) struct __align__(sizeof(T) * 2) storage -#elif defined(_CCCL_COMPILER_ICC) +#elif _CCCL_COMPILER(ICC) struct storage -#else // !(defined(_CCCL_COMPILER_ICC) || (defined(_CCCL_CUDA_COMPILER_NVCC) && _CCCL_CUDACC_BELOW(11, 7))) +#else // !(_CCCL_COMPILER(ICC) || (defined(_CCCL_CUDA_COMPILER_NVCC) && _CCCL_CUDACC_BELOW(11, 7))) struct alignas(sizeof(T) * 2) storage -#endif // !(defined(_CCCL_COMPILER_ICC) || (defined(_CCCL_CUDA_COMPILER_NVCC) && _CCCL_CUDACC_BELOW(11, 7))) +#endif // !(_CCCL_COMPILER(ICC) || (defined(_CCCL_CUDA_COMPILER_NVCC) && _CCCL_CUDACC_BELOW(11, 7))) { T x; T y; } -#ifdef _CCCL_COMPILER_ICC +#if _CCCL_COMPILER(ICC) __attribute__((aligned(sizeof(T) * 2))) -#endif // _CCCL_COMPILER_ICC +#endif // _CCCL_COMPILER(ICC) ; storage data; }; diff --git a/thrust/thrust/detail/config/compiler.h b/thrust/thrust/detail/config/compiler.h index 7644b2d2e8f..b160db1f9dd 100644 --- a/thrust/thrust/detail/config/compiler.h +++ b/thrust/thrust/detail/config/compiler.h @@ -62,7 +62,7 @@ # define THRUST_MSVC_VERSION _CCCL_MSVC_VERSION //! deprecated [Since 2.7] # define THRUST_MSVC_VERSION_FULL _CCCL_MSVC_VERSION_FULL -#elif defined(_CCCL_COMPILER_ICC) +#elif _CCCL_COMPILER(ICC) //! deprecated [Since 2.7] # define THRUST_HOST_COMPILER THRUST_HOST_COMPILER_INTEL #elif defined(_CCCL_COMPILER_CLANG)