aboutsummaryrefslogtreecommitdiff
path: root/src/common/utils/Utils.h
diff options
context:
space:
mode:
authorSang-Hoon Park <sang-hoon.park@arm.com>2021-03-31 15:18:16 +0100
committerGeorgios Pinitas <georgios.pinitas@arm.com>2021-04-19 07:35:54 +0000
commitc6fcfb4adc37a6cf09472168dc177234d4fabdfa (patch)
treeb67afd4c8d1594053395394b24406334e66e0791 /src/common/utils/Utils.h
parentfe56edb4fd7a620fea4b6002d87a9763bdf8791a (diff)
downloadComputeLibrary-c6fcfb4adc37a6cf09472168dc177234d4fabdfa.tar.gz
Add Tensor related utilities to the new API
A couple of utility functions to get the information about tensors are added. Those functions are placed at an additional header file for better grouping. Related test cases are also added. Resolves: COMPMID-4376 Change-Id: I6bd09cbf60fddcf4fe651906982397afb0451392 Signed-off-by: Sang-Hoon Park <sang-hoon.park@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5405 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/common/utils/Utils.h')
-rw-r--r--src/common/utils/Utils.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/utils/Utils.h b/src/common/utils/Utils.h
index 87be9df509..79f4f39c47 100644
--- a/src/common/utils/Utils.h
+++ b/src/common/utils/Utils.h
@@ -40,7 +40,7 @@ namespace utils
* @return A corresponding plain old C enumeration
*/
template <typename E, typename SE>
-constexpr E as_cenum(SE v) noexcept
+constexpr E as_cenum(const SE v) noexcept
{
return static_cast<E>(static_cast<std::underlying_type_t<SE>>(v));
}
@@ -55,7 +55,7 @@ constexpr E as_cenum(SE v) noexcept
* @return A corresponding strongly typed enumeration
*/
template <typename SE, typename E>
-constexpr SE as_enum(E val) noexcept
+constexpr SE as_enum(const E val) noexcept
{
return static_cast<SE>(val);
}