Commit 31b55797 authored by Umang Yadav's avatar Umang Yadav
Browse files

add flip overload

parent 78b8f79b
...@@ -239,6 +239,17 @@ bool verify_range_with_threshold(const R1& r1, ...@@ -239,6 +239,17 @@ bool verify_range_with_threshold(const R1& r1,
return error <= threshold; return error <= threshold;
} }
// expected argument should be passed as second, but if it is passed as the first by mistake then
// flip the order
template <class R1, class R2>
bool verify_range_with_threshold(const expected<R1>& r1,
const R2& r2,
double threshold,
double* out_error = nullptr)
{
return verify_range(r2, r1, threshold, out_error);
}
} // namespace verify } // namespace verify
} // namespace MIGRAPHX_INLINE_NS } // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx } // namespace migraphx
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment