Skip to content

Commit cd3c5d5

Browse files
committed
Add a comment to casting in ErfFunctor implementation
1 parent 78640ba commit cd3c5d5

File tree

1 file changed

+1
-0
lines changed
  • dpnp/backend/kernels/elementwise_functions

1 file changed

+1
-0
lines changed

dpnp/backend/kernels/elementwise_functions/erf.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ struct ErfFunctor
4747
{
4848
if constexpr (std::is_same_v<argT, sycl::half> &&
4949
std::is_same_v<Tp, float>) {
50+
// cast sycl::half to float for accuracy reasons
5051
return sycl::erf(float(x));
5152
}
5253
else {

0 commit comments

Comments
 (0)