From b9ff791fed08a6b9d877b460377c13f4e3b71d70 Mon Sep 17 00:00:00 2001 From: mehdi-goli Date: Tue, 27 Oct 2020 16:26:38 +0000 Subject: [PATCH] [Missing SYCL math op]: Addin the missing LDEXP Function for SYCL. --- Eigen/src/Core/arch/SYCL/MathFunctions.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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()); \ + } + +SYCL_PLDEXP(cl::sycl::cl_float4) +SYCL_PLDEXP(cl::sycl::cl_double2) +#undef SYCL_PLDEXP + #endif } // end namespace internal