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

Function round_half_away_from_zero

support/Rounding.h:107–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105 */
106template <typename T, ARM_COMPUTE_REQUIRES_TA(traits::is_floating_point<T>::value)>
107inline T round_half_away_from_zero(T value)
108{
109 T res = T(std::floor(std::fabs(value) + 0.5f));
110 return (value < 0.f) ? -res : res;
111}
112
113/** Round floating-point value with half value rounding to positive infinity.
114 *

Callers 15

precompute_dx_dy_offsetsFunction · 0.85
u8_neon_scale_nearestFunction · 0.85
s16_neon_scale_nearestFunction · 0.85
fp16_neon_scale_nearestFunction · 0.85
scale_nearest_nchwFunction · 0.85
nearest_neon_scaleFunction · 0.85
u8_sve_scale_nearestFunction · 0.85
s16_sve_scale_nearestFunction · 0.85
fp16_sve_scale_nearestFunction · 0.85
fp32_sve_scale_nearestFunction · 0.85

Calls 2

floorFunction · 0.85
fabsFunction · 0.85

Tested by

no test coverage detected