From 7dcc6971722fe3780ca81c51695905e864a6637d Mon Sep 17 00:00:00 2001 From: Nikhil Raj Date: Fri, 30 Apr 2021 15:44:24 +0100 Subject: IVGCVSW-5833 Move the ProfilingGuid out of Types.hpp to its own header in profiling common !android-nn-driver:5691 Signed-off-by: Nikhil Raj Change-Id: Ib71af0831e324ac6bd27b1a36f4a6ec1a703b14a --- include/armnn/Types.hpp | 95 ------------------------------------------------- 1 file changed, 95 deletions(-) (limited to 'include/armnn/Types.hpp') diff --git a/include/armnn/Types.hpp b/include/armnn/Types.hpp index de475ab68f..d829bfae00 100644 --- a/include/armnn/Types.hpp +++ b/include/armnn/Types.hpp @@ -6,7 +6,6 @@ #include #include -#include #include #include #include "BackendId.hpp" @@ -323,66 +322,6 @@ using DebugCallbackFunction = std::function; -namespace profiling -{ - -static constexpr uint64_t MIN_STATIC_GUID = 1llu << 63; - -class ProfilingGuid -{ -public: - ProfilingGuid() : m_Guid(0) {} - - ProfilingGuid(uint64_t guid) : m_Guid(guid) {} - - operator uint64_t() const { return m_Guid; } - - bool operator==(const ProfilingGuid& other) const - { - return m_Guid == other.m_Guid; - } - - bool operator!=(const ProfilingGuid& other) const - { - return m_Guid != other.m_Guid; - } - - bool operator<(const ProfilingGuid& other) const - { - return m_Guid < other.m_Guid; - } - - bool operator<=(const ProfilingGuid& other) const - { - return m_Guid <= other.m_Guid; - } - - bool operator>(const ProfilingGuid& other) const - { - return m_Guid > other.m_Guid; - } - - bool operator>=(const ProfilingGuid& other) const - { - return m_Guid >= other.m_Guid; - } - -protected: - uint64_t m_Guid; -}; - -/// Strongly typed guids to distinguish between those generated at runtime, and those that are statically defined. -struct ProfilingDynamicGuid : public ProfilingGuid -{ - using ProfilingGuid::ProfilingGuid; -}; - -struct ProfilingStaticGuid : public ProfilingGuid -{ - using ProfilingGuid::ProfilingGuid; -}; - -} // namespace profiling /// This list uses X macro technique. /// See https://en.wikipedia.org/wiki/X_Macro for more info @@ -468,37 +407,3 @@ enum class LayerType const char* GetLayerTypeAsCString(LayerType type); } // namespace armnn - - -namespace std -{ -/// make ProfilingGuid hashable -template<> -struct hash -{ - std::size_t operator()(armnn::profiling::ProfilingGuid const& guid) const noexcept - { - return hash()(uint64_t(guid)); - } -}; - -/// make ProfilingDynamicGuid hashable -template<> -struct hash -{ - std::size_t operator()(armnn::profiling::ProfilingDynamicGuid const& guid) const noexcept - { - return hash()(uint64_t(guid)); - } -}; - -/// make ProfilingStaticGuid hashable -template<> -struct hash -{ - std::size_t operator()(armnn::profiling::ProfilingStaticGuid const& guid) const noexcept - { - return hash()(uint64_t(guid)); - } -}; -} // namespace std -- cgit v1.2.1