mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-30 15:54:13 +08:00
Enable constant expressions when compiling cuda code with clang.
This commit is contained in:
parent
483aaad10a
commit
bc68fc2fe7
@ -370,8 +370,8 @@
|
|||||||
|
|
||||||
// Does the compiler support const expressions?
|
// Does the compiler support const expressions?
|
||||||
#ifdef __CUDACC__
|
#ifdef __CUDACC__
|
||||||
// Const expressions are supported provided that c++11 is enabled and we're using nvcc 7.5 or above
|
// Const expressions are supported provided that c++11 is enabled and we're using either clang or nvcc 7.5 or above
|
||||||
#if defined(__CUDACC_VER__) && __CUDACC_VER__ >= 70500 && __cplusplus > 199711L
|
#if __cplusplus > 199711L && defined(__CUDACC_VER__) && (defined(__clang__) || __CUDACC_VER__ >= 70500)
|
||||||
#define EIGEN_HAS_CONSTEXPR 1
|
#define EIGEN_HAS_CONSTEXPR 1
|
||||||
#endif
|
#endif
|
||||||
#elif (defined(__cplusplus) && __cplusplus >= 201402L) || \
|
#elif (defined(__cplusplus) && __cplusplus >= 201402L) || \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user