From b8f8dac4ebddd2ca8db596fd7d67e4b35ee553be Mon Sep 17 00:00:00 2001 From: Rasmus Munk Larsen Date: Thu, 20 Jun 2019 16:18:37 -0700 Subject: Update comment as suggested by tra@google.com. --- Eigen/src/Core/arch/GPU/Half.h | 6 +++--- Eigen/src/Core/arch/GPU/PacketMath.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'Eigen/src/Core/arch/GPU') diff --git a/Eigen/src/Core/arch/GPU/Half.h b/Eigen/src/Core/arch/GPU/Half.h index c510d3beb..ffd4789cb 100644 --- a/Eigen/src/Core/arch/GPU/Half.h +++ b/Eigen/src/Core/arch/GPU/Half.h @@ -313,9 +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 -// suspect that NVCC is doing device-side preprocessing with clang, but actually -// compiling with cicc, which is obviously not clang. +// We need to distinguish ‘clang as the CUDA compiler’ from ‘clang as the host compiler, +// invoked by NVCC’ (e.g. on MacOS). The former needs to see both host and device implementation +// of the functions, while the latter can only deal with one one of them. #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 d09795163..afc086090 100644 --- a/Eigen/src/Core/arch/GPU/PacketMath.h +++ b/Eigen/src/Core/arch/GPU/PacketMath.h @@ -102,9 +102,9 @@ template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2 pset1(const do return make_double2(from, from); } -// The EIGEN_COMP_CLANG && !EIGEN_COMP_NVCC clause is necessary on Mac where we -// suspect that NVCC is doing device-side preprocessing with clang, but actually -// compiling with cicc, which is obviously not clang. +// We need to distinguish ‘clang as the CUDA compiler’ from ‘clang as the host compiler, +// invoked by NVCC’ (e.g. on MacOS). The former needs to see both host and device implementation +// of the functions, while the latter can only deal with one one of them. #if defined(EIGEN_CUDA_ARCH) || defined(EIGEN_HIP_DEVICE_COMPILE) || (defined(EIGEN_CUDACC) && EIGEN_COMP_CLANG && !EIGEN_COMP_NVCC) namespace { -- cgit v1.2.3