39 switch(rounding_policy)
43 rounded =
static_cast<int>(x);
54 asm(
"fcvtns %x[res], %s[value]"
Rounds to nearest value; half rounds away from zero.
#define ARM_COMPUTE_ERROR(msg)
Print the given message then throw an std::runtime_error.
Copyright (c) 2017-2021 Arm Limited.
RoundingPolicy
Rounding method.
int round(float x, RoundingPolicy rounding_policy)
Return a rounded value of x.
Rounds to nearest value; half rounds to nearest even.
T round(T value)
Round floating-point value with half value rounding away from zero.
Truncates the least significant values that are lost in operations.