Compute Library
 21.02
Rounding.h File Reference

Go to the source code of this file.

Namespaces

 arm_compute
 Copyright (c) 2017-2021 Arm Limited.
 
 arm_compute::utils
 
 arm_compute::utils::rounding
 

Enumerations

enum  RoundingMode {
  TO_ZERO, AWAY_FROM_ZERO, HALF_TO_ZERO, HALF_AWAY_FROM_ZERO,
  HALF_UP, HALF_DOWN, HALF_EVEN
}
 Rounding mode. More...
 

Functions

template<typename T , ARM_COMPUTE_REQUIRES_TA(traits::is_floating_point< T >::value) >
round_to_zero (T value)
 Round floating-point value with round to zero. More...
 
template<typename T , ARM_COMPUTE_REQUIRES_TA(traits::is_floating_point< T >::value) >
round_away_from_zero (T value)
 Round floating-point value with round away from zero. More...
 
template<typename T , ARM_COMPUTE_REQUIRES_TA(traits::is_floating_point< T >::value) >
round_half_to_zero (T value)
 Round floating-point value with half value rounding towards zero. More...
 
template<typename T , ARM_COMPUTE_REQUIRES_TA(traits::is_floating_point< T >::value) >
round_half_away_from_zero (T value)
 Round floating-point value with half value rounding away from zero. More...
 
template<typename T , ARM_COMPUTE_REQUIRES_TA(traits::is_floating_point< T >::value) >
round_half_up (T value)
 Round floating-point value with half value rounding to positive infinity. More...
 
template<typename T , ARM_COMPUTE_REQUIRES_TA(traits::is_floating_point< T >::value) >
round_half_down (T value)
 Round floating-point value with half value rounding to negative infinity. More...
 
template<typename T , ARM_COMPUTE_REQUIRES_TA(traits::is_floating_point< T >::value) >
round_half_even (T value, T epsilon=std::numeric_limits< T >::epsilon())
 Round floating-point value with half value rounding to nearest even. More...
 
template<typename T , ARM_COMPUTE_REQUIRES_TA(traits::is_floating_point< T >::value) >
round (T value, RoundingMode rounding_mode)
 Round floating-point value given a rounding mode. More...