From a90115ee7ce8c21f0da7a9b03755ff1a0d0a9a3c Mon Sep 17 00:00:00 2001 From: Lukas Mosimann Date: Fri, 12 Jun 2020 00:08:03 -0700 Subject: [PATCH] fixes for CUDA 11 --- include/gridtools/common/tuple_util.hpp | 3 ++- include/gridtools/meta/macros.hpp | 2 +- include/gridtools/sid/composite.hpp | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/gridtools/common/tuple_util.hpp b/include/gridtools/common/tuple_util.hpp index 4a5074cdf6..4c62c5b323 100644 --- a/include/gridtools/common/tuple_util.hpp +++ b/include/gridtools/common/tuple_util.hpp @@ -475,7 +475,8 @@ namespace gridtools { Fun m_fun; template - GT_TARGET GT_FORCE_INLINE GT_CONSTEXPR decltype(auto) operator()(Args &&... args) const { + GT_TARGET GT_FORCE_INLINE GT_CONSTEXPR auto operator()(Args &&... args) const + -> decltype(m_fun(wstd::forward(args)...)) { return m_fun(wstd::forward(args)...); } }; diff --git a/include/gridtools/meta/macros.hpp b/include/gridtools/meta/macros.hpp index 1d58311a06..5f0fcc8bf1 100644 --- a/include/gridtools/meta/macros.hpp +++ b/include/gridtools/meta/macros.hpp @@ -22,7 +22,7 @@ * NVCC bug workaround: sizeof... works incorrectly within template alias context. */ #if defined(__CUDACC_VER_MAJOR__) && \ - (__CUDACC_VER_MAJOR__ < 10 || (__CUDACC_VER_MAJOR__ == 10 && __CUDACC_VER_MINOR__ < 3)) + (__CUDACC_VER_MAJOR__ < 11 || (__CUDACC_VER_MAJOR__ == 11 && __CUDACC_VER_MINOR__ < 1)) namespace gridtools { namespace meta { diff --git a/include/gridtools/sid/composite.hpp b/include/gridtools/sid/composite.hpp index 7491de301c..a601a5e263 100644 --- a/include/gridtools/sid/composite.hpp +++ b/include/gridtools/sid/composite.hpp @@ -299,7 +299,10 @@ namespace gridtools { template class values { static_assert(sizeof...(Keys) == sizeof...(Sids), GT_INTERNAL_ERROR); +#if defined(__CUDACC_VER_MAJOR__) && __CUDACC_VER_MAJOR__ == 11 && __CUDACC_VER_MINOR__ < 1 +#else static_assert(conjunction...>::value, GT_INTERNAL_ERROR); +#endif typename hymap::keys::template values m_sids;