From 21633e585b61564159d9cfbfbbad9006b8a09d64 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Thu, 24 Aug 2017 11:06:47 +0200 Subject: bug #1462: remove all occurences of the deprecated __CUDACC_VER__ macro by introducing EIGEN_CUDACC_VER --- Eigen/Core | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Eigen/Core') diff --git a/Eigen/Core b/Eigen/Core index f613ee9aa..f6fe4b0ec 100644 --- a/Eigen/Core +++ b/Eigen/Core @@ -22,6 +22,14 @@ #define EIGEN_CUDA_ARCH __CUDA_ARCH__ #endif +#if defined(__CUDACC_VER_MAJOR__) && (__CUDACC_VER_MAJOR__ >= 9) +#define EIGEN_CUDACC_VER ((__CUDACC_VER_MAJOR__ * 10000) + (__CUDACC_VER_MINOR__ * 100)) +#elif defined(__CUDACC_VER__) +#define EIGEN_CUDACC_VER __CUDACC_VER__ +#else +#define EIGEN_CUDACC_VER 0 +#endif + // Handle NVCC/CUDA/SYCL #if defined(EIGEN_CUDACC) || defined(__SYCL_DEVICE_ONLY__) // Do not try asserts on CUDA and SYCL! @@ -248,7 +256,7 @@ #if defined EIGEN_CUDACC #define EIGEN_VECTORIZE_CUDA #include - #if defined __CUDACC_VER__ && __CUDACC_VER__ >= 70500 + #if EIGEN_CUDACC_VER >= 70500 #define EIGEN_HAS_CUDA_FP16 #endif #endif -- cgit v1.2.3