From 22031ab59a5b9c7b2612feaa12abe7bcef56a8e2 Mon Sep 17 00:00:00 2001 From: Mehdi Goli Date: Wed, 8 Aug 2018 11:07:27 +0100 Subject: Adding EIGEN_UNROLL_LOOP macro. --- Eigen/src/Core/util/Macros.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Eigen/src/Core/util/Macros.h') diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h index 9a2f5ab05..81ca6b8fe 100644 --- a/Eigen/src/Core/util/Macros.h +++ b/Eigen/src/Core/util/Macros.h @@ -1092,5 +1092,15 @@ bool all(T t, Ts ... ts){ return t && all(ts...); } } #endif +// Wrapping #pragma unroll in a macro since it is required for SYCL +#if defined(__SYCL_DEVICE_ONLY__) + #if defined(_MSC_VER) + #define EIGEN_UNROLL_LOOP __Pragma(unroll) + #else + #define EIGEN_UNROLL_LOOP _Pragma("unroll") + #endif +#else + #define EIGEN_UNROLL_LOOP +#endif #endif // EIGEN_MACROS_H -- cgit v1.2.3