diff options
author | Gael Guennebaud <g.gael@free.fr> | 2017-08-24 11:06:47 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2017-08-24 11:06:47 +0200 |
commit | 21633e585b61564159d9cfbfbbad9006b8a09d64 (patch) | |
tree | b981e8fce85da82cb8be57192ea9708d36815cc8 /Eigen/Core | |
parent | 12249849b5ef7ec0c64f74440690fb00708b8da6 (diff) |
bug #1462: remove all occurences of the deprecated __CUDACC_VER__ macro by introducing EIGEN_CUDACC_VER
Diffstat (limited to 'Eigen/Core')
-rw-r--r-- | Eigen/Core | 10 |
1 files changed, 9 insertions, 1 deletions
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 <vector_types.h> - #if defined __CUDACC_VER__ && __CUDACC_VER__ >= 70500 + #if EIGEN_CUDACC_VER >= 70500 #define EIGEN_HAS_CUDA_FP16 #endif #endif |