Skip to content

Commit fd16ef2

Browse files
committed
[SYCL] [Test] Improve readability for math_utils.hpp
Signed-off-by: haonanya <[email protected]>
1 parent b670056 commit fd16ef2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sycl/test/devicelib/math_utils.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ bool is_about_FP(T x, T y) {
88

99
// At least one input is nan
1010
if (std::isnan(x) || std::isnan(y))
11-
ret = std::isnan(x) && std::isnan(y);
11+
return std::isnan(x) && std::isnan(y);
1212

1313
// At least one input is inf
14-
else if (std::isinf(x) || std::isinf(y))
14+
if (std::isinf(x) || std::isinf(y))
1515
ret = (x == y);
1616

1717
// two finite

0 commit comments

Comments
 (0)