From c5a613982c12977cef2e2e16aaf9c50fa1629a88 Mon Sep 17 00:00:00 2001 From: Giorgio Arena Date: Wed, 6 Jan 2021 15:13:08 +0000 Subject: Clean up macro definitions in arm_compute headers - Expose loose macros by prefixing "ARM_COMPUTE_" Resolves: COMPMID-3701 Signed-off-by: Giorgio Arena Change-Id: I4334b01c1a5cd8585f4a1ba2d870be956c61a83d Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4769 Reviewed-by: Georgios Pinitas Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins --- support/Requires.h | 6 +++--- support/Rounding.h | 18 +++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'support') diff --git a/support/Requires.h b/support/Requires.h index bc4932adc5..21c98ca766 100644 --- a/support/Requires.h +++ b/support/Requires.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2020 Arm Limited. + * Copyright (c) 2018-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -40,9 +40,9 @@ enum class enabler } // namespace arm_compute /** Requirements as template */ -#define REQUIRES_T(...) template ::type = 0> +#define ARM_COMPUTE_REQUIRES_T(...) template ::type = 0> /** Requirements as template argument */ -#define REQUIRES_TA(...) typename = typename std::enable_if<(__VA_ARGS__), arm_compute::utils::requires::detail::enabler>::type +#define ARM_COMPUTE_REQUIRES_TA(...) typename = typename std::enable_if<(__VA_ARGS__), arm_compute::utils::requires::detail::enabler>::type // clang-format on // *INDENT-ON* } // namespace requires diff --git a/support/Rounding.h b/support/Rounding.h index ba9266d323..47c8f76834 100644 --- a/support/Rounding.h +++ b/support/Rounding.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2020 Arm Limited. + * Copyright (c) 2018-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -57,7 +57,7 @@ enum class RoundingMode * * @return Floating-point value of rounded @p value. */ -template ::value)> +template ::value)> inline T round_to_zero(T value) { T res = std::floor(std::fabs(value)); @@ -72,7 +72,7 @@ inline T round_to_zero(T value) * * @return Floating-point value of rounded @p value. */ -template ::value)> +template ::value)> inline T round_away_from_zero(T value) { T res = std::ceil(std::fabs(value)); @@ -87,7 +87,7 @@ inline T round_away_from_zero(T value) * * @return Floating-point value of rounded @p value. */ -template ::value)> +template ::value)> inline T round_half_to_zero(T value) { T res = T(std::ceil(std::fabs(value) - 0.5f)); @@ -102,7 +102,7 @@ inline T round_half_to_zero(T value) * * @return Floating-point value of rounded @p value. */ -template ::value)> +template ::value)> inline T round_half_away_from_zero(T value) { T res = T(std::floor(std::fabs(value) + 0.5f)); @@ -117,7 +117,7 @@ inline T round_half_away_from_zero(T value) * * @return Floating-point value of rounded @p value. */ -template ::value)> +template ::value)> inline T round_half_up(T value) { return std::floor(value + 0.5f); @@ -131,7 +131,7 @@ inline T round_half_up(T value) * * @return Floating-point value of rounded @p value. */ -template ::value)> +template ::value)> inline T round_half_down(T value) { return std::ceil(value - 0.5f); @@ -146,7 +146,7 @@ inline T round_half_down(T value) * * @return Floating-point value of rounded @p value. */ -template ::value)> +template ::value)> inline T round_half_even(T value, T epsilon = std::numeric_limits::epsilon()) { T positive_value = std::abs(value); @@ -176,7 +176,7 @@ inline T round_half_even(T value, T epsilon = std::numeric_limits::epsilon()) * * @return Floating-point value of rounded @p value. */ -template ::value)> +template ::value)> inline T round(T value, RoundingMode rounding_mode) { switch(rounding_mode) -- cgit v1.2.1