From 6db5f20ade72896ebf0f6513a4832b8f2e917aa0 Mon Sep 17 00:00:00 2001 From: Matteo Martincigh Date: Thu, 5 Sep 2019 12:02:04 +0100 Subject: IVGCVSW-3691 Rework the CounterDirectory class to take into consideration the connections between components * Added constructors and connections to the profiling classes * Used hash table to keep track of the profiling objects by UID * Added register methods * Added find/check helper methods * Updated the makefile to include the profiling directory * Added unit tests for the CounterDirectory class * Added ICounterDirectory interface class for read-only use * Added custom macro to locally disable conversion warnings Change-Id: I3f53a68663ee77b8d03ac0ef7dc01e90c6893511 Signed-off-by: Matteo Martincigh --- include/armnn/Conversion.hpp | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 include/armnn/Conversion.hpp (limited to 'include/armnn/Conversion.hpp') diff --git a/include/armnn/Conversion.hpp b/include/armnn/Conversion.hpp new file mode 100644 index 0000000000..37338eded7 --- /dev/null +++ b/include/armnn/Conversion.hpp @@ -0,0 +1,40 @@ +// +// Copyright © 2019 Arm Ltd. All rights reserved. +// SPDX-License-Identifier: MIT +// + +#pragma once + +#if __GNUC__ +# define ARMNN_NO_CONVERSION_WARN_BEGIN \ + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wconversion\"") + +# define ARMNN_NO_CONVERSION_WARN_END \ + _Pragma("GCC diagnostic pop") + +#elif __clang__ +# define ARMNN_NO_CONVERSION_WARN_BEGIN \ + _Pragma("clang diagnostic push") \ + _Pragma("clang diagnostic ignored \"-Wconversion\"") + +# define ARMNN_NO_CONVERSION_WARN_END \ + _Pragma("clang diagnostic pop") + +#elif defined (_MSC_VER) +# define ARMNN_NO_CONVERSION_WARN_BEGIN \ + __pragma(warning( push )) \ + __pragma(warning(disable : 4101)) + +# define ARMNN_NO_CONVERSION_WARN_END \ + __pragma(warning( pop )) + +#else +# define ARMNN_NO_CONVERSION_WARN_BEGIN +# define ARMNN_NO_CONVERSION_WARN_END +#endif + +#define ARMNN_SUPRESS_CONVERSION_WARNING(func) \ +ARMNN_NO_CONVERSION_WARN_BEGIN \ +func; \ +ARMNN_NO_CONVERSION_WARN_END -- cgit v1.2.1