[Offload] Fix missing abs
function for test
Summary: We don't have the abs function to link against, just use the builtin.
This commit is contained in:
parent
d09231a422
commit
2cc1644299
@ -23,7 +23,7 @@ bool equal(T LHS, T RHS) {
|
||||
template <typename T,
|
||||
std::enable_if_t<std::is_floating_point<T>::value, bool> = true>
|
||||
bool equal(T LHS, T RHS) {
|
||||
return std::abs(LHS - RHS) < std::numeric_limits<T>::epsilon();
|
||||
return __builtin_fabs(LHS - RHS) < std::numeric_limits<T>::epsilon();
|
||||
}
|
||||
|
||||
template <typename T> void test() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user