aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/util/Macros.h
diff options
context:
space:
mode:
authorGravatar Mehdi Goli <mehdi.goli@codeplay.com>2018-08-08 11:07:27 +0100
committerGravatar Mehdi Goli <mehdi.goli@codeplay.com>2018-08-08 11:07:27 +0100
commit22031ab59a5b9c7b2612feaa12abe7bcef56a8e2 (patch)
tree26425c38c2ea190a2e7dcc731e0596475fef4871 /Eigen/src/Core/util/Macros.h
parent10d286f55b30bfcd45be3e83c44edde5ac184270 (diff)
Adding EIGEN_UNROLL_LOOP macro.
Diffstat (limited to 'Eigen/src/Core/util/Macros.h')
-rw-r--r--Eigen/src/Core/util/Macros.h10
1 files changed, 10 insertions, 0 deletions
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