diff options
author | Mehdi Goli <mehdi.goli@codeplay.com> | 2019-06-27 12:25:09 +0100 |
---|---|---|
committer | Mehdi Goli <mehdi.goli@codeplay.com> | 2019-06-27 12:25:09 +0100 |
commit | 16a56b2dddbfaf2d4b81d62be5e3139f12783ac8 (patch) | |
tree | 9ce9ce2f27b9cfadfc34004aecede743e65b6d51 /Eigen/Core | |
parent | adec097c61bd2ff049378b063a4665910c1ed5cc (diff) |
[SYCL] This PR adds the minimum modifications to Eigen core required to run Eigen unsupported modules on devices supporting SYCL.
* Adding SYCL memory model
* Enabling/Disabling SYCL backend in Core
* Supporting Vectorization
Diffstat (limited to 'Eigen/Core')
-rw-r--r-- | Eigen/Core | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/Eigen/Core b/Eigen/Core index 759b1bb80..af741a241 100644 --- a/Eigen/Core +++ b/Eigen/Core @@ -101,13 +101,23 @@ #include <intrin.h> #endif -#if defined(__SYCL_DEVICE_ONLY__) +#if defined(EIGEN_USE_SYCL) #undef min #undef max #undef isnan #undef isinf #undef isfinite #include <SYCL/sycl.hpp> + #include <map> + #include <memory> + #include <utility> + #include <thread> + #ifndef EIGEN_SYCL_LOCAL_THREAD_DIM0 + #define EIGEN_SYCL_LOCAL_THREAD_DIM0 16 + #endif + #ifndef EIGEN_SYCL_LOCAL_THREAD_DIM1 + #define EIGEN_SYCL_LOCAL_THREAD_DIM1 16 + #endif #endif @@ -207,12 +217,15 @@ using std::ptrdiff_t; #include "src/Core/arch/GPU/MathFunctions.h" #endif -#if defined EIGEN_VECTORIZE_SYCL +#if defined(EIGEN_USE_SYCL) + #include "src/Core/arch/SYCL/SyclMemoryModel.h" #include "src/Core/arch/SYCL/InteropHeaders.h" +#if !defined(EIGEN_DONT_VECTORIZE_SYCL) #include "src/Core/arch/SYCL/PacketMath.h" #include "src/Core/arch/SYCL/MathFunctions.h" #include "src/Core/arch/SYCL/TypeCasting.h" #endif +#endif #include "src/Core/arch/Default/Settings.h" #include "src/Core/functors/TernaryFunctors.h" |