aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/arch/SYCL
diff options
context:
space:
mode:
authorGravatar mehdi-goli <mehdi.goli@codeplay.com>2020-01-10 17:55:15 +0000
committerGravatar mehdi-goli <mehdi.goli@codeplay.com>2020-01-10 18:00:36 +0000
commit601f89dfd0e02df0010466139d34ae7940d91b3a (patch)
tree6932c3fa83afd1a1690132abb804a30292e65876 /Eigen/src/Core/arch/SYCL
parent2ea5a715cfc742f086666ebb2a237fa54423814f (diff)
Adding RInt vector support for SYCL.
Diffstat (limited to 'Eigen/src/Core/arch/SYCL')
-rw-r--r--Eigen/src/Core/arch/SYCL/InteropHeaders.h1
-rw-r--r--Eigen/src/Core/arch/SYCL/MathFunctions.h11
2 files changed, 12 insertions, 0 deletions
diff --git a/Eigen/src/Core/arch/SYCL/InteropHeaders.h b/Eigen/src/Core/arch/SYCL/InteropHeaders.h
index 44042f441..710059d50 100644
--- a/Eigen/src/Core/arch/SYCL/InteropHeaders.h
+++ b/Eigen/src/Core/arch/SYCL/InteropHeaders.h
@@ -65,6 +65,7 @@ struct sycl_packet_traits : default_packet_traits {
HasAdd = 1,
HasFloor = 1,
HasRound = 1,
+ HasRint = 1,
HasLog1p = 1,
HasExpm1 = 1,
HasCeil = 1,
diff --git a/Eigen/src/Core/arch/SYCL/MathFunctions.h b/Eigen/src/Core/arch/SYCL/MathFunctions.h
index 9e16e6c3f..a96625e2c 100644
--- a/Eigen/src/Core/arch/SYCL/MathFunctions.h
+++ b/Eigen/src/Core/arch/SYCL/MathFunctions.h
@@ -236,6 +236,17 @@ SYCL_PROUND(cl::sycl::cl_float4)
SYCL_PROUND(cl::sycl::cl_double2)
#undef SYCL_PROUND
+#define SYCL_PRINT(packet_type) \
+ template<> \
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE packet_type print<packet_type>( \
+ const packet_type& a) { \
+ return cl::sycl::rint(a); \
+ }
+
+SYCL_PRINT(cl::sycl::cl_float4)
+SYCL_PRINT(cl::sycl::cl_double2)
+#undef SYCL_PRINT
+
#define SYCL_FLOOR(packet_type) \
template <> \
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE packet_type pfloor<packet_type>( \