Skip to content

Commit 2cc1644

Browse files
committed
[Offload] Fix missing abs function for test
Summary: We don't have the abs function to link against, just use the builtin.
1 parent d09231a commit 2cc1644

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

offload/test/offloading/ompx_bare_shfl_down_sync.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ bool equal(T LHS, T RHS) {
2323
template <typename T,
2424
std::enable_if_t<std::is_floating_point<T>::value, bool> = true>
2525
bool equal(T LHS, T RHS) {
26-
return std::abs(LHS - RHS) < std::numeric_limits<T>::epsilon();
26+
return __builtin_fabs(LHS - RHS) < std::numeric_limits<T>::epsilon();
2727
}
2828

2929
template <typename T> void test() {

0 commit comments

Comments
 (0)