Skip to content

Commit 394727f

Browse files
Use static_assert to isclose
1 parent f68249c commit 394727f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

dpnp/backend/kernels/elementwise_functions/isclose.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ inline bool isclose(const T a,
4949
const T atol,
5050
const bool equal_nan)
5151
{
52+
static_assert(std::is_floating_point_v<T> || std::is_same_v<T, sycl::half>);
53+
5254
if (sycl::isfinite(a) && sycl::isfinite(b)) {
5355
return sycl::fabs(a - b) <= atol + rtol * sycl::fabs(b);
5456
}

0 commit comments

Comments
 (0)