23.11
|
Go to the documentation of this file.
40 switch (rounding_policy)
44 rounded =
static_cast<int>(x);
55 asm(
"fcvtns %x[res], %s[value]" : [res]
"=r"(rounded) : [value]
"w"(x));
@ TO_NEAREST_EVEN
Rounds to nearest value; half rounds to nearest even.
T round(T value)
Round floating-point value with half value rounding away from zero.
#define ARM_COMPUTE_ERROR(msg)
Print the given message then throw an std::runtime_error.
@ TO_NEAREST_UP
Rounds to nearest value; half rounds away from zero.
RoundingPolicy
Rounding method.
int round(float x, RoundingPolicy rounding_policy)
Return a rounded value of x.
Copyright (c) 2017-2023 Arm Limited.
@ TO_ZERO
Truncates the least significant values that are lost in operations.