From 22031ab59a5b9c7b2612feaa12abe7bcef56a8e2 Mon Sep 17 00:00:00 2001 From: Mehdi Goli Date: Wed, 8 Aug 2018 11:07:27 +0100 Subject: [PATCH 1/2] Adding EIGEN_UNROLL_LOOP macro. --- Eigen/src/Core/util/Macros.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h index 9a2f5ab054..81ca6b8fee 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 From 67711eaa310b1f1db67fc866cc64f703faa4f788 Mon Sep 17 00:00:00 2001 From: Mehdi Goli Date: Wed, 8 Aug 2018 11:38:10 +0100 Subject: [PATCH 2/2] Fixing typo. --- Eigen/src/Core/util/Macros.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h index 81ca6b8fee..bcdede61ea 100644 --- a/Eigen/src/Core/util/Macros.h +++ b/Eigen/src/Core/util/Macros.h @@ -1095,7 +1095,7 @@ bool all(T t, Ts ... ts){ return t && all(ts...); } // 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) + #define EIGEN_UNROLL_LOOP __pragma(unroll) #else #define EIGEN_UNROLL_LOOP _Pragma("unroll") #endif