Skip to content

Commit 2bd78ba

Browse files
Use realT(0) instead of literal 0.0
Literal 0.0 is interpreted as double(0) causing kernel build error on devices without fp64 support.
1 parent 5ebd6c3 commit 2bd78ba

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ template <typename argT, typename resT> struct ProjFunctor
7272
const realT y = std::imag(in);
7373

7474
if (std::isinf(x) || std::isinf(y)) {
75-
const realT res_im = std::copysign(0.0, y);
75+
const realT res_im = std::copysign(realT(0), y);
7676
return resT{std::numeric_limits<realT>::infinity(), res_im};
7777
}
7878
return in;

0 commit comments

Comments
 (0)