[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:
Joseph Huber 2024-06-06 14:36:34 -05:00
parent d09231a422
commit 2cc1644299

View File

@ -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() {