File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
dpnp/backend/kernels/elementwise_functions Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change 2525
2626#pragma once
2727
28- #include < sycl/ext/intel/math.hpp>
2928#include < sycl/sycl.hpp>
3029
3130/* *
3736#define __SYCL_COMPILER_BESSEL_I0_SUPPORT 20241030L
3837#endif
3938
39+ #if __SYCL_COMPILER_VERSION >= __SYCL_COMPILER_BESSEL_I0_SUPPORT
40+ #include < sycl/ext/intel/math.hpp>
41+ #endif
42+
4043namespace dpnp ::kernels::i0
4144{
4245/* *
@@ -215,7 +218,7 @@ inline Tp bessel_ik_0(Tp x)
215218 * @return The output regular modified Bessel function.
216219 */
217220template <typename Tp>
218- inline Tp cyl_bessel_0 (Tp x)
221+ inline Tp cyl_bessel_i0 (Tp x)
219222{
220223 if (sycl::isnan (x)) {
221224 return std::numeric_limits<Tp>::quiet_NaN ();
@@ -252,13 +255,17 @@ struct I0Functor
252255 resT operator ()(const argT &x) const
253256 {
254257#if __SYCL_COMPILER_VERSION >= __SYCL_COMPILER_BESSEL_I0_SUPPORT
255- return sycl::ext::intel::math::cyl_bessel_i0 (x) ;
258+ using sycl::ext::intel::math::cyl_bessel_i0;
256259#else
260+ using impl::cyl_bessel_i0;
261+ #endif
262+
257263 if constexpr (std::is_same_v<resT, sycl::half>) {
258- return static_cast <resT>(impl::cyl_bessel_0<float >(float (x)));
264+ return static_cast <resT>(cyl_bessel_i0<float >(float (x)));
265+ }
266+ else {
267+ return cyl_bessel_i0 (x);
259268 }
260- return impl::cyl_bessel_0 (x);
261- #endif
262269 }
263270};
264271} // namespace dpnp::kernels::i0
You can’t perform that action at this time.
0 commit comments