aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/arch/SYCL
diff options
context:
space:
mode:
authorGravatar mehdi-goli <mehdi.goli@codeplay.com>2020-10-27 16:26:38 +0000
committerGravatar David Tellenbach <david.tellenbach@me.com>2020-10-28 08:32:57 +0000
commitb9ff791fed08a6b9d877b460377c13f4e3b71d70 (patch)
tree1e31ef90cda69c682cd86db36d1211d4c21e8722 /Eigen/src/Core/arch/SYCL
parent61461d682a8ae5eda20d82fd49e50c8a3631155d (diff)
[Missing SYCL math op]: Addin the missing LDEXP Function for SYCL.
Diffstat (limited to 'Eigen/src/Core/arch/SYCL')
-rw-r--r--Eigen/src/Core/arch/SYCL/MathFunctions.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/Eigen/src/Core/arch/SYCL/MathFunctions.h b/Eigen/src/Core/arch/SYCL/MathFunctions.h
index 5190d591b..7d8cd132b 100644
--- a/Eigen/src/Core/arch/SYCL/MathFunctions.h
+++ b/Eigen/src/Core/arch/SYCL/MathFunctions.h
@@ -281,6 +281,19 @@ SYCL_PMAX(cl::sycl::cl_float4, cl::sycl::fmax(a, b))
SYCL_PMAX(cl::sycl::cl_double2, cl::sycl::fmax(a, b))
#undef SYCL_PMAX
+#define SYCL_PLDEXP(packet_type) \
+ template <> \
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE packet_type pldexp( \
+ const packet_type& a, const packet_type& exponent) { \
+ return cl::sycl::ldexp( \
+ a, exponent.template convert<cl::sycl::cl_int, \
+ cl::sycl::rounding_mode::automatic>()); \
+ }
+
+SYCL_PLDEXP(cl::sycl::cl_float4)
+SYCL_PLDEXP(cl::sycl::cl_double2)
+#undef SYCL_PLDEXP
+
#endif
} // end namespace internal