Added comment explaining the surprising EIGEN_COMP_CLANG && !EIGEN_COMP_NVCC clause.

This commit is contained in:
Rasmus Munk Larsen 2019-06-20 15:59:08 -07:00
parent b5237f53b1
commit 302a404b7e
2 changed files with 6 additions and 0 deletions

View File

@ -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)

View File

@ -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 {