aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/arch/GPU
diff options
context:
space:
mode:
authorGravatar Rasmus Munk Larsen <rmlarsen@google.com>2019-06-20 15:59:08 -0700
committerGravatar Rasmus Munk Larsen <rmlarsen@google.com>2019-06-20 15:59:08 -0700
commit302a404b7e764ae890e30b37f1b32bc5e4b871ea (patch)
tree7e1c996dc6343e3d33723e5352a7771445e371de /Eigen/src/Core/arch/GPU
parentb5237f53b13937b7a6212490eae291dcd4295645 (diff)
Added comment explaining the surprising EIGEN_COMP_CLANG && !EIGEN_COMP_NVCC clause.
Diffstat (limited to 'Eigen/src/Core/arch/GPU')
-rw-r--r--Eigen/src/Core/arch/GPU/Half.h3
-rw-r--r--Eigen/src/Core/arch/GPU/PacketMath.h3
2 files changed, 6 insertions, 0 deletions
diff --git a/Eigen/src/Core/arch/GPU/Half.h b/Eigen/src/Core/arch/GPU/Half.h
index 732975729..bd0c2a0b3 100644
--- a/Eigen/src/Core/arch/GPU/Half.h
+++ b/Eigen/src/Core/arch/GPU/Half.h
@@ -313,6 +313,9 @@ EIGEN_STRONG_INLINE __device__ bool operator >= (const half& a, const half& b) {
#endif
+// The EIGEN_COMP_CLANG && !EIGEN_COMP_NVCC clause is necessary on Mac where we
+// that suspect NVCC doing device-side preprocessing with clang, but actually
+// compiling with cicc, which is obviously not clang.
#if !defined(EIGEN_HAS_NATIVE_FP16) || (EIGEN_COMP_CLANG && !EIGEN_COMP_NVCC) // Emulate support for half floats
#if EIGEN_COMP_CLANG && defined(EIGEN_CUDACC)
diff --git a/Eigen/src/Core/arch/GPU/PacketMath.h b/Eigen/src/Core/arch/GPU/PacketMath.h
index e50d16246..54e4e9f22 100644
--- a/Eigen/src/Core/arch/GPU/PacketMath.h
+++ b/Eigen/src/Core/arch/GPU/PacketMath.h
@@ -102,6 +102,9 @@ template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2 pset1<double2>(const do
return make_double2(from, from);
}
+// The EIGEN_COMP_CLANG && !EIGEN_COMP_NVCC clause is necessary on Mac where we
+// that suspect NVCC doing device-side preprocessing with clang, but actually
+// compiling with cicc, which is obviously not clang.
#if defined(EIGEN_CUDA_ARCH) || defined(EIGEN_HIP_DEVICE_COMPILE) || (defined(EIGEN_CUDACC) && EIGEN_COMP_CLANG && !EIGEN_COMP_NVCC)
namespace {