aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/Core
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-11-03 03:55:11 -0700
committerGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-11-03 03:55:11 -0700
commitc80587c92b019de2bd31572aea95e5e6144f4207 (patch)
treedb8f34b522ab216863ee276373a2cea335801a76 /Eigen/Core
parent38b6048e1443d36d74760176ebe048bd8cd59446 (diff)
parent3f1d0cdc2270f13fbc72d6b7080012e22329aabd (diff)
Merged eigen/eigen into default
Diffstat (limited to 'Eigen/Core')
-rw-r--r--Eigen/Core37
1 files changed, 27 insertions, 10 deletions
diff --git a/Eigen/Core b/Eigen/Core
index f5eec0e39..f5d1126cc 100644
--- a/Eigen/Core
+++ b/Eigen/Core
@@ -14,9 +14,19 @@
// first thing Eigen does: stop the compiler from committing suicide
#include "src/Core/util/DisableStupidWarnings.h"
-// Handle NVCC/CUDA
-#ifdef __CUDACC__
- // Do not try asserts on CUDA!
+/// This will no longer be needed after the next release of the computecppCE
+#ifdef EIGEN_USE_SYCL
+#undef min
+#undef max
+#undef isnan
+#undef isinf
+#undef isfinite
+#include <SYCL/sycl.hpp>
+#endif
+
+// Handle NVCC/CUDA/SYCL
+#if defined(__CUDACC__) || defined(__SYCL_DEVICE_ONLY__)
+ // Do not try asserts on CUDA and SYCL!
#ifndef EIGEN_NO_DEBUG
#define EIGEN_NO_DEBUG
#endif
@@ -25,17 +35,24 @@
#undef EIGEN_INTERNAL_DEBUGGING
#endif
- // Do not try to vectorize on CUDA!
- #ifndef EIGEN_DONT_VECTORIZE
- #define EIGEN_DONT_VECTORIZE
- #endif
-
#ifdef EIGEN_EXCEPTIONS
#undef EIGEN_EXCEPTIONS
#endif
// All functions callable from CUDA code must be qualified with __device__
- #define EIGEN_DEVICE_FUNC __host__ __device__
+ #ifdef __CUDACC__
+ // Do not try to vectorize on CUDA and SYCL!
+ #ifndef EIGEN_DONT_VECTORIZE
+ #define EIGEN_DONT_VECTORIZE
+ #endif
+
+ #define EIGEN_DEVICE_FUNC __host__ __device__
+ // We need math_functions.hpp to ensure that that EIGEN_USING_STD_MATH macro
+ // works properly on the device side
+ #include <math_functions.hpp>
+ #else
+ #define EIGEN_DEVICE_FUNC
+ #endif
#else
#define EIGEN_DEVICE_FUNC
@@ -51,7 +68,7 @@
#define EIGEN_USING_STD_MATH(FUNC) using std::FUNC;
#endif
-#if (defined(_CPPUNWIND) || defined(__EXCEPTIONS)) && !defined(__CUDA_ARCH__) && !defined(EIGEN_EXCEPTIONS)
+#if (defined(_CPPUNWIND) || defined(__EXCEPTIONS)) && !defined(__CUDA_ARCH__) && !defined(EIGEN_EXCEPTIONS) && !defined(EIGEN_USE_SYCL)
#define EIGEN_EXCEPTIONS
#endif