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
diff --git a/profiling/common/include/CommandHandlerFunctor.hpp b/profiling/common/include/CommandHandlerFunctor.hpp
index 9827aa0..7e31a70 100644
--- a/profiling/common/include/CommandHandlerFunctor.hpp
+++ b/profiling/common/include/CommandHandlerFunctor.hpp
@@ -5,7 +5,7 @@
 
 #pragma once
 
-#include <Packet.hpp>
+#include "Packet.hpp"
 #include <cstdint>
 
 namespace arm
diff --git a/profiling/common/include/ProfilingGuid.hpp b/profiling/common/include/ProfilingGuid.hpp
new file mode 100644
index 0000000..4d0dd9b
--- /dev/null
+++ b/profiling/common/include/ProfilingGuid.hpp
@@ -0,0 +1,113 @@
+//
+// Copyright © 2021 Arm Ltd and Contributors. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+
+#pragma once
+
+#include <memory>
+#include <stdint.h>
+
+namespace armnn
+{
+
+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
+
+
+
+} // 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
\ No newline at end of file