diff options
author | Rasmus Munk Larsen <rmlarsen@google.com> | 2019-06-20 15:44:14 -0700 |
---|---|---|
committer | Rasmus Munk Larsen <rmlarsen@google.com> | 2019-06-20 15:44:14 -0700 |
commit | b5237f53b13937b7a6212490eae291dcd4295645 (patch) | |
tree | 3b245633e6c0b52f338b95911709fc59d33b89ba /Eigen/src/Core/arch/GPU | |
parent | 988f24b730fe812e2e31d332d33277752fba435d (diff) |
Fix CUDA build on Mac.
Diffstat (limited to 'Eigen/src/Core/arch/GPU')
-rw-r--r-- | Eigen/src/Core/arch/GPU/Half.h | 2 | ||||
-rw-r--r-- | Eigen/src/Core/arch/GPU/PacketMath.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Eigen/src/Core/arch/GPU/Half.h b/Eigen/src/Core/arch/GPU/Half.h index e433bfe1c..732975729 100644 --- a/Eigen/src/Core/arch/GPU/Half.h +++ b/Eigen/src/Core/arch/GPU/Half.h @@ -313,7 +313,7 @@ EIGEN_STRONG_INLINE __device__ bool operator >= (const half& a, const half& b) { #endif -#if !defined(EIGEN_HAS_NATIVE_FP16) || EIGEN_COMP_CLANG // Emulate support for half floats +#if !defined(EIGEN_HAS_NATIVE_FP16) || (EIGEN_COMP_CLANG && !EIGEN_COMP_NVCC) // Emulate support for half floats #if EIGEN_COMP_CLANG && defined(EIGEN_CUDACC) // We need to provide emulated *host-side* FP16 operators for clang. diff --git a/Eigen/src/Core/arch/GPU/PacketMath.h b/Eigen/src/Core/arch/GPU/PacketMath.h index adb260643..e50d16246 100644 --- a/Eigen/src/Core/arch/GPU/PacketMath.h +++ b/Eigen/src/Core/arch/GPU/PacketMath.h @@ -102,7 +102,7 @@ template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2 pset1<double2>(const do return make_double2(from, from); } -#if defined(EIGEN_CUDA_ARCH) || defined(EIGEN_HIP_DEVICE_COMPILE) || (defined(EIGEN_CUDACC) && EIGEN_COMP_CLANG) +#if defined(EIGEN_CUDA_ARCH) || defined(EIGEN_HIP_DEVICE_COMPILE) || (defined(EIGEN_CUDACC) && EIGEN_COMP_CLANG && !EIGEN_COMP_NVCC) namespace { EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float bitwise_and(const float& a, |