MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / round_away_from_zero

Function round_away_from_zero

support/Rounding.h:77–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75 */
76template <typename T, ARM_COMPUTE_REQUIRES_TA(traits::is_floating_point<T>::value)>
77inline T round_away_from_zero(T value)
78{
79 T res = std::ceil(std::fabs(value));
80 return (value < 0.f) ? -res : res;
81}
82
83/** Round floating-point value with half value rounding towards zero.
84 *

Callers 1

roundFunction · 0.85

Calls 2

ceilFunction · 0.85
fabsFunction · 0.85

Tested by

no test coverage detected