aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/util/Macros.h
diff options
context:
space:
mode:
authorGravatar Rasmus Munk Larsen <rmlarsen@google.com>2018-10-18 16:55:02 -0700
committerGravatar Rasmus Munk Larsen <rmlarsen@google.com>2018-10-18 16:55:02 -0700
commitd8f285852b79a97b4a6d6822f979796e9dd791d2 (patch)
tree02ebbaf34db84a0b3a76ef129a096275318eb5cf /Eigen/src/Core/util/Macros.h
parentdda68f56eca13d6942ee9aabb0b6c55153802548 (diff)
Only set EIGEN_CONSTEXPR_ARE_DEVICE_FUNC for clang++ if cxx_relaxed_constexpr is available.
Diffstat (limited to 'Eigen/src/Core/util/Macros.h')
-rw-r--r--Eigen/src/Core/util/Macros.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h
index dd4866724..e3015281b 100644
--- a/Eigen/src/Core/util/Macros.h
+++ b/Eigen/src/Core/util/Macros.h
@@ -654,12 +654,9 @@
#ifdef __CUDACC_RELAXED_CONSTEXPR__
#define EIGEN_CONSTEXPR_ARE_DEVICE_FUNC
#endif
- // See bug 1580: clang/CUDA fails to make the following calls
- // to constexpr bool std::equal_to::operator() even when
- // EIGEN_CONSTEXPR_ARE_DEVICE_FUNC is defined in c++14 only.
- // #elif defined(__clang__) && defined(__CUDA__) && EIGEN_HAS_CONSTEXPR == 1
- // // clang++ always considers constexpr functions as implicitly __host__ __device__
- // #define EIGEN_CONSTEXPR_ARE_DEVICE_FUNC
+ #elif defined(__clang__) && defined(__CUDA__) && __has_feature(cxx_relaxed_constexpr)
+ // clang++ always considers constexpr functions as implicitly __host__ __device__
+ #define EIGEN_CONSTEXPR_ARE_DEVICE_FUNC
#endif
#endif