aboutsummaryrefslogtreecommitdiff
path: root/support
diff options
context:
space:
mode:
authorGiorgio Arena <giorgio.arena@arm.com>2021-01-06 15:13:08 +0000
committerGiorgio Arena <giorgio.arena@arm.com>2021-01-07 09:56:31 +0000
commitc5a613982c12977cef2e2e16aaf9c50fa1629a88 (patch)
tree6686d4f27083d23cc598abd60d8d75921a86ea4d /support
parentee82d349a53d8f70cc2481581849575291872842 (diff)
downloadComputeLibrary-c5a613982c12977cef2e2e16aaf9c50fa1629a88.tar.gz
Clean up macro definitions in arm_compute headers
- Expose loose macros by prefixing "ARM_COMPUTE_" Resolves: COMPMID-3701 Signed-off-by: Giorgio Arena <giorgio.arena@arm.com> Change-Id: I4334b01c1a5cd8585f4a1ba2d870be956c61a83d Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4769 Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'support')
-rw-r--r--support/Requires.h6
-rw-r--r--support/Rounding.h18
2 files changed, 12 insertions, 12 deletions
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 <bool Cond = (__VA_ARGS__), typename std::enable_if<Cond, int>::type = 0>
+#define ARM_COMPUTE_REQUIRES_T(...) template <bool Cond = (__VA_ARGS__), typename std::enable_if<Cond, int>::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 <typename T, REQUIRES_TA(traits::is_floating_point<T>::value)>
+template <typename T, ARM_COMPUTE_REQUIRES_TA(traits::is_floating_point<T>::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 <typename T, REQUIRES_TA(traits::is_floating_point<T>::value)>
+template <typename T, ARM_COMPUTE_REQUIRES_TA(traits::is_floating_point<T>::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 <typename T, REQUIRES_TA(traits::is_floating_point<T>::value)>
+template <typename T, ARM_COMPUTE_REQUIRES_TA(traits::is_floating_point<T>::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 <typename T, REQUIRES_TA(traits::is_floating_point<T>::value)>
+template <typename T, ARM_COMPUTE_REQUIRES_TA(traits::is_floating_point<T>::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 <typename T, REQUIRES_TA(traits::is_floating_point<T>::value)>
+template <typename T, ARM_COMPUTE_REQUIRES_TA(traits::is_floating_point<T>::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 <typename T, REQUIRES_TA(traits::is_floating_point<T>::value)>
+template <typename T, ARM_COMPUTE_REQUIRES_TA(traits::is_floating_point<T>::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 <typename T, REQUIRES_TA(traits::is_floating_point<T>::value)>
+template <typename T, ARM_COMPUTE_REQUIRES_TA(traits::is_floating_point<T>::value)>
inline T round_half_even(T value, T epsilon = std::numeric_limits<T>::epsilon())
{
T positive_value = std::abs(value);
@@ -176,7 +176,7 @@ inline T round_half_even(T value, T epsilon = std::numeric_limits<T>::epsilon())
*
* @return Floating-point value of rounded @p value.
*/
-template <typename T, REQUIRES_TA(traits::is_floating_point<T>::value)>
+template <typename T, ARM_COMPUTE_REQUIRES_TA(traits::is_floating_point<T>::value)>
inline T round(T value, RoundingMode rounding_mode)
{
switch(rounding_mode)