aboutsummaryrefslogtreecommitdiff
path: root/src/core/Utils.cpp
diff options
context:
space:
mode:
authorMatthew Bentham <Matthew.Bentham@arm.com>2023-05-30 13:35:34 +0000
committerMatthew Bentham <matthew.bentham@arm.com>2023-06-15 11:22:29 +0000
commitf1aeab9cfb6e9a2a5a16ed79bf341ad11c555233 (patch)
tree1dad30483ae919a0645e5ccec5d51a29da16a1b4 /src/core/Utils.cpp
parentbec9b032ddcff449c7ad40febbcab24c23ee58a0 (diff)
downloadComputeLibrary-f1aeab9cfb6e9a2a5a16ed79bf341ad11c555233.tar.gz
Break up arm_compute/core/Types.h a bit
Split some of the larger types with inlined code into their own header files, so that the implementation of them needn't be included everywhere. Change-Id: Id3ec2d42efbd33cedb55705a5a24e1b90c8b7a01 Signed-off-by: Matthew Bentham <Matthew.Bentham@arm.com> Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/c/VisualCompute/ComputeLibrary/+/524782 Tested-by: bsgcomp <bsgcomp@arm.com> Reviewed-by: Gunes Bayir <gunes.bayir@arm.com> Comments-Addressed: bsgcomp <bsgcomp@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9757 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Pablo Marquez Tello <pablo.tello@arm.com> Reviewed-by: Jakub Sujak <jakub.sujak@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/Utils.cpp')
-rw-r--r--src/core/Utils.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/Utils.cpp b/src/core/Utils.cpp
index d05a044fc8..392603d5e6 100644
--- a/src/core/Utils.cpp
+++ b/src/core/Utils.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2022 Arm Limited.
+ * Copyright (c) 2016-2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,7 @@
#include "arm_compute/core/Helpers.h"
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/Utils.h"
#include <algorithm>
@@ -160,7 +161,7 @@ const std::string &string_from_data_type(DataType dt)
return dt_map[dt];
}
-const std::string &string_from_activation_func(ActivationLayerInfo::ActivationFunction act)
+const std::string &string_from_activation_func(const ActivationLayerInfo::ActivationFunction& act)
{
static std::map<ActivationLayerInfo::ActivationFunction, const std::string> act_map =
{
@@ -555,7 +556,7 @@ QuantizationInfo get_softmax_output_quantization_info(DataType input_type, bool
return QuantizationInfo(1.f / 256, 0);
}
-std::pair<int32_t, int32_t> get_quantized_activation_min_max(ActivationLayerInfo act_info, DataType data_type, UniformQuantizationInfo oq_info)
+std::pair<int32_t, int32_t> get_quantized_activation_min_max(const ActivationLayerInfo& act_info, DataType data_type, UniformQuantizationInfo oq_info)
{
const bool is_qasymm8_signed = is_data_type_quantized_asymmetric_signed(data_type);
const auto a = act_info.a();
@@ -687,4 +688,4 @@ int max_consecutive_elements_display_width(std::ostream &s, DataType dt, const u
}
#endif /* ARM_COMPUTE_ASSERTS_ENABLED */
-} // namespace arm_compute \ No newline at end of file
+} // namespace arm_compute