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

Function round_half_to_zero

support/Rounding.h:92–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90 */
91template <typename T, ARM_COMPUTE_REQUIRES_TA(traits::is_floating_point<T>::value)>
92inline T round_half_to_zero(T value)
93{
94 T res = T(std::ceil(std::fabs(value) - 0.5f));
95 return (value < 0.f) ? -res : res;
96}
97
98/** Round floating-point value with half value rounding away from zero.
99 *

Callers 1

roundFunction · 0.85

Calls 2

ceilFunction · 0.85
fabsFunction · 0.85

Tested by

no test coverage detected