diff options
Diffstat (limited to 'Eigen/Core')
-rw-r--r-- | Eigen/Core | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/Eigen/Core b/Eigen/Core index 946ed0677..3d2152acf 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 |