diff options
author | Luke Iwanski <luke@codeplay.com> | 2016-09-19 12:44:13 +0100 |
---|---|---|
committer | Luke Iwanski <luke@codeplay.com> | 2016-09-19 12:44:13 +0100 |
commit | cb81975714a96ecb2faf33ca242feeee3543b1db (patch) | |
tree | febc8730a60a48572cb293696c170d7cb50a4728 /Eigen/Core | |
parent | 59bacfe5201b54a6303b79bb538671d04f91dbce (diff) |
Partial OpenCL support via SYCL compatible with ComputeCpp CE.
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 |