aboutsummaryrefslogtreecommitdiff
path: root/src/common/utils/Log.h
diff options
context:
space:
mode:
authorramelg01 <ramy.elgammal@arm.com>2021-09-12 23:07:47 +0100
committerramy.elgammal <ramy.elgammal@arm.com>2021-09-16 13:33:41 +0000
commit3ae3d88c1a305ef4fc0beed8fda3cfc39ddb2ae8 (patch)
tree3bab18d64b773a76766844a7e34819443fd7ee8d /src/common/utils/Log.h
parent2ec6163cdbd274ec9207a7b4ee6e144f93440b4f (diff)
downloadComputeLibrary-3ae3d88c1a305ef4fc0beed8fda3cfc39ddb2ae8.tar.gz
Provide logging for configure functions in all cpu operators
Partially Resolves: COMPMID-4718 Signed-off-by: Ramy Elgammal <ramy.elgammal@arm.com> Change-Id: I02eabdd6bce8cd561ab2fdfd644a686a3762b817 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/6253 Reviewed-by: Giorgio Arena <giorgio.arena@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/common/utils/Log.h')
-rw-r--r--src/common/utils/Log.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/common/utils/Log.h b/src/common/utils/Log.h
index 89e86bf2fc..a9d0d79876 100644
--- a/src/common/utils/Log.h
+++ b/src/common/utils/Log.h
@@ -134,15 +134,17 @@ logParamsImpl(std::vector<std::string> &data_registry, const std::tuple<Tp...> &
/** Function Template with variable number of inputs to collect all the passed parameters from
* the logging macro ARM_COMPUTE_LOG_PARAMS(...)
*
- * @param[in] ...ins The input parameters in the variadic template
+ * @param[in] ...ins The input parameters in the variadic template, taken by reference, (not by value) to avoid
+ * detecting T as an abstract data type when passing any of these parameters as L-value reference
+ * to an abstract type.
*
- * @return vector of the parameters' data in a string format
+ * @return Vector of the parameters' data in a string format
*/
template <typename... Ts>
-const std::vector<std::string> logParams(Ts... ins)
+const std::vector<std::string> logParams(Ts &&... ins)
{
std::vector<std::string> data_registry{};
- std::tuple<Ts...> in_params_tuple(ins...);
+ std::tuple<Ts...> in_params_tuple{ ins... };
// Start logging the tuple elements, starting from 0 to tuple_size-1
logParamsImpl<0>(data_registry, in_params_tuple);
@@ -210,8 +212,10 @@ inline const std::string constructDataLog(const std::vector<std::string> &params
*
* @param[in] ... Input parameters
*/
-#define ARM_COMPUTE_LOG_PARAMS(...) \
- ARM_COMPUTE_LOG_INFO_WITH_FUNCNAME_ACL(constructDataLog(getParamsNames(#__VA_ARGS__), \
- logParams(__VA_ARGS__)));
-
+#define ARM_COMPUTE_LOG_PARAMS(...) \
+ do \
+ { \
+ ARM_COMPUTE_LOG_INFO_WITH_FUNCNAME_ACL(constructDataLog(getParamsNames(#__VA_ARGS__), \
+ logParams(__VA_ARGS__))); \
+ } while(false)
#endif /* SRC_COMMON_LOG_H */