diff options
author | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2016-10-07 11:04:16 -0700 |
---|---|---|
committer | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2016-10-07 11:04:16 -0700 |
commit | 5c68051cd7941a83de4c9dcc18a437e4a800ed12 (patch) | |
tree | b67f1cbab955c89c71ba580002c7f6b3675e5449 /Eigen | |
parent | d485d12c51bc46286f7439377e3ab591f67ddbbf (diff) | |
parent | d7f9679a34ef991fa3c9da8f61510d6c48aaa19c (diff) |
Merge the content of the ComputeCpp branch into the default branch
Diffstat (limited to 'Eigen')
-rw-r--r-- | Eigen/Core | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/Eigen/Core b/Eigen/Core index fcc107721..ed007dfa9 100644 --- a/Eigen/Core +++ b/Eigen/Core @@ -51,7 +51,40 @@ #define EIGEN_USING_STD_MATH(FUNC) using std::FUNC; #endif -#if (defined(_CPPUNWIND) || defined(__EXCEPTIONS)) && !defined(__CUDA_ARCH__) && !defined(EIGEN_EXCEPTIONS) +#ifdef EIGEN_USE_SYCL +#undef min +#undef max +#undef isnan +#undef isinf +#undef isfinite +#include <SYCL/sycl.hpp> +#endif + +// We need these predefines to determine if asserts need to be disabled for the device compiler +#if defined(__SYCL_DEVICE_ONLY__) + // Do not try asserts on SYCL! + #ifndef EIGEN_NO_DEBUG + #define EIGEN_NO_DEBUG + #endif + + #ifdef EIGEN_INTERNAL_DEBUGGING + #undef EIGEN_INTERNAL_DEBUGGING + #endif + + // Do not try to vectorize on SYCL! + #ifndef EIGEN_DONT_VECTORIZE + #define EIGEN_DONT_VECTORIZE + #endif + + #ifdef EIGEN_EXCEPTIONS + #undef EIGEN_EXCEPTIONS + #endif + + #define EIGEN_DEVICE_FUNC + +#endif + +#if (defined(_CPPUNWIND) || defined(__EXCEPTIONS)) && !defined(__CUDA_ARCH__) && !defined(EIGEN_EXCEPTIONS) && !defined(EIGEN_USE_SYCL) #define EIGEN_EXCEPTIONS #endif |