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

Function round

support/Rounding.h:181–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179 */
180template <typename T, ARM_COMPUTE_REQUIRES_TA(traits::is_floating_point<T>::value)>
181inline T round(T value, RoundingMode rounding_mode)
182{
183 switch (rounding_mode)
184 {
185 case RoundingMode::TO_ZERO:
186 return round_to_zero(value);
187 case RoundingMode::AWAY_FROM_ZERO:
188 return round_away_from_zero(value);
189 case RoundingMode::HALF_TO_ZERO:
190 return round_half_to_zero(value);
191 case RoundingMode::HALF_AWAY_FROM_ZERO:
192 return round_half_away_from_zero(value);
193 case RoundingMode::HALF_UP:
194 return round_half_up(value);
195 case RoundingMode::HALF_DOWN:
196 return round_half_down(value);
197 case RoundingMode::HALF_EVEN:
198 return round_half_even(value);
199 default:
200 ARM_COMPUTE_ERROR("Unsupported rounding mode!");
201 }
202}
203} // namespace rounding
204} // namespace utils
205} // namespace arm_compute

Callers 15

round_half_evenFunction · 0.70
quantizeMethod · 0.50
quantize_qsymm8Function · 0.50
quantize_qsymm16Function · 0.50
quantize_qasymm16Function · 0.50
round_half_evenFunction · 0.50
Utils.cppFile · 0.50
reduce_operationFunction · 0.50
roi_pool_layerFunction · 0.50

Calls 7

round_to_zeroFunction · 0.85
round_away_from_zeroFunction · 0.85
round_half_to_zeroFunction · 0.85
round_half_downFunction · 0.85
round_half_upFunction · 0.70
round_half_evenFunction · 0.70

Tested by

no test coverage detected