diff options
author | Nikhil Raj <nikhil.raj@arm.com> | 2021-04-30 15:44:24 +0100 |
---|---|---|
committer | Nikhil Raj <nikhil.raj@arm.com> | 2021-06-01 22:14:24 +0100 |
commit | 7dcc6971722fe3780ca81c51695905e864a6637d (patch) | |
tree | 113696974bcbd3a0a4e6df73ea0470c47eca1294 /include/armnn/Types.hpp | |
parent | b8942bf1a49b8ec710fafd7915dd9c8fee62230d (diff) | |
download | armnn-7dcc6971722fe3780ca81c51695905e864a6637d.tar.gz |
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 <nikhil.raj@arm.com>
Change-Id: Ib71af0831e324ac6bd27b1a36f4a6ec1a703b14a
Diffstat (limited to 'include/armnn/Types.hpp')
-rw-r--r-- | include/armnn/Types.hpp | 95 |
1 files changed, 0 insertions, 95 deletions
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 <array> #include <functional> -#include <memory> #include <stdint.h> #include <chrono> #include "BackendId.hpp" @@ -323,66 +322,6 @@ using DebugCallbackFunction = std::function<void(LayerGuid guid, unsigned int sl using HighResolutionClock = std::chrono::high_resolution_clock::time_point; using InferenceTimingPair = std::pair<HighResolutionClock, HighResolutionClock>; -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<armnn::profiling::ProfilingGuid> -{ - std::size_t operator()(armnn::profiling::ProfilingGuid const& guid) const noexcept - { - return hash<uint64_t>()(uint64_t(guid)); - } -}; - -/// make ProfilingDynamicGuid hashable -template<> -struct hash<armnn::profiling::ProfilingDynamicGuid> -{ - std::size_t operator()(armnn::profiling::ProfilingDynamicGuid const& guid) const noexcept - { - return hash<uint64_t>()(uint64_t(guid)); - } -}; - -/// make ProfilingStaticGuid hashable -template<> -struct hash<armnn::profiling::ProfilingStaticGuid> -{ - std::size_t operator()(armnn::profiling::ProfilingStaticGuid const& guid) const noexcept - { - return hash<uint64_t>()(uint64_t(guid)); - } -}; -} // namespace std |