Protect against compilation errors with nvcc and numext/complex.

Disable functions explicitely involving std::complex when compiling with nvcc.
Improve code compatilibity using the new macro EIGEN_USING_NUMEXT_MATH (same spirit than EIGEN_USING_STD_MATH but for numext functions)
This commit is contained in:
Nicolas Mellado
2015-07-06 20:55:01 +02:00
parent c2019dfeb3
commit 5359e5cdb2
4 changed files with 66 additions and 35 deletions

View File

@@ -42,6 +42,12 @@
#define EIGEN_USING_STD_MATH(FUNC) using std::FUNC;
#endif
#if defined(__CUDA_ARCH__)
#define EIGEN_USING_NUMEXT_MATH(FUNC) using ::FUNC;
#else
#define EIGEN_USING_NUMEXT_MATH(FUNC) using numext::FUNC;
#endif
#if (defined(_CPPUNWIND) || defined(__EXCEPTIONS)) && !defined(__CUDA_ARCH__) && !defined(EIGEN_EXCEPTIONS)
#define EIGEN_EXCEPTIONS
#endif