Skip to content

Commit e0aea28

Browse files
Resolved SYCL-2020 deprecation warning
``` In file included from ~/dpctl/dpctl/tensor/libtensor/source/elementwise_functions.cpp:56: ~/dpctl/dpctl/tensor/libtensor/include/kernels/elementwise_functions/expm1.hpp:118:42: warning: 'sincos' is deprecated: SYCL builtin functions with raw pointer arguments have been deprecated. Please use multi_ptr. [-Wdeprecated-declarations] 118 | const realT sinY_val = sycl::sincos(y, &cosY_val); ``` The resolution is to convert raw pointer to multi-pointer using `sycl::address_space_cast`.
1 parent 8eab04b commit e0aea28

File tree

1 file changed

+4
-1
lines changed
  • dpctl/tensor/libtensor/include/kernels/elementwise_functions

1 file changed

+4
-1
lines changed

dpctl/tensor/libtensor/include/kernels/elementwise_functions/expm1.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,10 @@ template <typename argT, typename resT> struct Expm1Functor
115115

116116
// x, y finite numbers
117117
realT cosY_val;
118-
const realT sinY_val = sycl::sincos(y, &cosY_val);
118+
auto cosY_val_multi_ptr = sycl::address_space_cast<
119+
sycl::access::address_space::global_space,
120+
sycl::access::decorated::yes>(&cosY_val);
121+
const realT sinY_val = sycl::sincos(y, cosY_val_multi_ptr);
119122
const realT sinhalfY_val = std::sin(y / 2);
120123

121124
const realT res_re =

0 commit comments

Comments
 (0)