diff options
author | Diego Lopez Recas <Diego.LopezRecas@arm.com> | 2017-12-04 18:56:10 +0000 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:45:00 +0000 |
commit | 35ceeb2199c569810a1524a0a21c2df2a3f5f29e (patch) | |
tree | 4a55f8626cb2960843547fabdb2431a70ec1029a /arm_compute/core/Utils.h | |
parent | 97cf2497d2b617de3209330893ad51bd0cc126ce (diff) | |
download | ComputeLibrary-35ceeb2199c569810a1524a0a21c2df2a3f5f29e.tar.gz |
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 <anthony.barbier@arm.com>
Tested-by: Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/core/Utils.h')
-rw-r--r-- | arm_compute/core/Utils.h | 16 |
1 files changed, 8 insertions, 8 deletions
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 <typename S, typename T> +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 <typename S, typename T> 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 <typename S, typename T> -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 |