From 0a878ae1bbb13002e50f8287721750d2e4b22680 Mon Sep 17 00:00:00 2001 From: Jaroslaw Rzepecki Date: Wed, 22 Nov 2017 17:16:39 +0000 Subject: COMPMID-556: Added a rounding policy to the quantize function Change-Id: I6272a36636c5d9baff6d35dee0a50dc847f65bfa Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/110266 Tested-by: BSG Visual Compute Jenkins server to access repositories on http://mpd-gerrit.cambridge.arm.com Reviewed-by: Anthony Barbier --- arm_compute/core/Utils.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'arm_compute/core/Utils.h') diff --git a/arm_compute/core/Utils.h b/arm_compute/core/Utils.h index af9cf23548..9397d507f8 100644 --- a/arm_compute/core/Utils.h +++ b/arm_compute/core/Utils.h @@ -62,6 +62,15 @@ constexpr auto DIV_CEIL(S val, T m) -> decltype((val + m - 1) / m) return (val + m - 1) / m; } +/** Return a rounded value of x. Rounding is done according to the rounding_policy. + * + * @param[in] x Float value to be rounded. + * @param[in] rounding_policy Policy determining how rounding is done. + * + * @return Rounded value of the argument x. + */ +int round(float x, RoundingPolicy rounding_policy); + /** Returns the arm_compute library build information * * Contains the version number and the build options used to build the library -- cgit v1.2.1