From 35ceeb2199c569810a1524a0a21c2df2a3f5f29e Mon Sep 17 00:00:00 2001 From: Diego Lopez Recas Date: Mon, 4 Dec 2017 18:56:10 +0000 Subject: IVGCVSW-798 Add Softmax NEON support for QASYMM8 Change-Id: I4f2cca52caf210fdb7d6bb7e9436ac51cb5088b4 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/112398 Reviewed-by: Anthony Barbier Tested-by: Jenkins --- arm_compute/core/Utils.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'arm_compute/core/Utils.h') diff --git a/arm_compute/core/Utils.h b/arm_compute/core/Utils.h index 51967b1762..fc89d97073 100644 --- a/arm_compute/core/Utils.h +++ b/arm_compute/core/Utils.h @@ -40,12 +40,19 @@ namespace arm_compute { +/** Calculate the rounded up quotient of val / m. */ +template +constexpr auto DIV_CEIL(S val, T m) -> decltype((val + m - 1) / m) +{ + return (val + m - 1) / m; +} + /** Computes the smallest number larger or equal to value that is a multiple of divisor. */ template inline auto ceil_to_multiple(S value, T divisor) -> decltype(((value + divisor - 1) / divisor) * divisor) { ARM_COMPUTE_ERROR_ON(value < 0 || divisor <= 0); - return ((value + divisor - 1) / divisor) * divisor; + return DIV_CEIL(value, divisor) * divisor; } /** Computes the largest number smaller or equal to value that is a multiple of divisor. */ @@ -56,13 +63,6 @@ inline auto floor_to_multiple(S value, T divisor) -> decltype((value / divisor) return (value / divisor) * divisor; } -/** Calculate the rounded up quotient of val / m. */ -template -constexpr auto DIV_CEIL(S val, T m) -> decltype((val + m - 1) / m) -{ - return (val + m - 1) / m; -} - /** Returns the arm_compute library build information * * Contains the version number and the build options used to build the library -- cgit v1.2.1