From bbfe603e5ae42317a2b67d713d00882bea341c88 Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Mon, 20 Jul 2020 16:57:44 +0100 Subject: IVGCVSW-5166 Pull out the common and server side code into standalone libraries Change-Id: I180f84c493a9b2be4b93b25d312ebdd9e71b1735 Signed-off-by: Jim Flynn --- include/armnn/Conversion.hpp | 2 +- include/armnn/Logging.hpp | 2 +- include/armnn/profiling/ILocalPacketHandler.hpp | 16 +++-- include/armnn/profiling/ITimelineDecoder.hpp | 82 ------------------------- include/armnn/utility/Assert.hpp | 2 +- include/armnn/utility/IgnoreUnused.hpp | 2 +- include/armnn/utility/NumericCast.hpp | 2 +- 7 files changed, 16 insertions(+), 92 deletions(-) delete mode 100644 include/armnn/profiling/ITimelineDecoder.hpp (limited to 'include/armnn') diff --git a/include/armnn/Conversion.hpp b/include/armnn/Conversion.hpp index e2bccd0372..24c1d7c85a 100644 --- a/include/armnn/Conversion.hpp +++ b/include/armnn/Conversion.hpp @@ -1,5 +1,5 @@ // -// Copyright © 2019 Arm Ltd. All rights reserved. +// Copyright © 2019 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // diff --git a/include/armnn/Logging.hpp b/include/armnn/Logging.hpp index 84152e543e..27971c56e4 100644 --- a/include/armnn/Logging.hpp +++ b/include/armnn/Logging.hpp @@ -1,5 +1,5 @@ // -// Copyright © 2019 Arm Ltd. All rights reserved. +// Copyright © 2019 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // diff --git a/include/armnn/profiling/ILocalPacketHandler.hpp b/include/armnn/profiling/ILocalPacketHandler.hpp index 158c0eb852..af1b0f88b8 100644 --- a/include/armnn/profiling/ILocalPacketHandler.hpp +++ b/include/armnn/profiling/ILocalPacketHandler.hpp @@ -12,6 +12,15 @@ #include #include +// forward declare to prevent a circular dependency +namespace arm +{ +namespace pipe +{ + class Packet; +} // namespace pipe +} // namespace arm + namespace armnn { @@ -24,9 +33,6 @@ enum class TargetEndianness LeWire }; -// forward declare to prevent a circular dependency -class Packet; - // the handlers need to be able to do two // things to service the FileOnlyProfilingConnection // and any other implementation of IProfilingConnection @@ -39,7 +45,7 @@ public: virtual void SetEndianess(const TargetEndianness& endianness) = 0; - virtual void ReturnPacket(Packet& packet) = 0; + virtual void ReturnPacket(arm::pipe::Packet& packet) = 0; virtual void Close() = 0; }; @@ -56,7 +62,7 @@ public: virtual std::vector GetHeadersAccepted() = 0; /// process the packet - virtual void HandlePacket(const Packet& packet) = 0; + virtual void HandlePacket(const arm::pipe::Packet& packet) = 0; /// Set a profiling connection on the handler. Only need to implement this /// function if the handler will be writing data back to the profiled application. diff --git a/include/armnn/profiling/ITimelineDecoder.hpp b/include/armnn/profiling/ITimelineDecoder.hpp deleted file mode 100644 index 0035a3b7d2..0000000000 --- a/include/armnn/profiling/ITimelineDecoder.hpp +++ /dev/null @@ -1,82 +0,0 @@ -// -// Copyright © 2020 Arm Ltd. All rights reserved. -// SPDX-License-Identifier: MIT -// - -#pragma once - -#include -#include - -class ITimelineDecoder -{ - -public: - - enum class TimelineStatus - { - TimelineStatus_Success, - TimelineStatus_Fail - }; - - enum class RelationshipType - { - RetentionLink, /// Head retains(parents) Tail - ExecutionLink, /// Head execution start depends on Tail execution completion - DataLink, /// Head uses data of Tail - LabelLink /// Head uses label Tail (Tail MUST be a guid of a label). - }; - - static char const* GetRelationshipAsCString(RelationshipType rType) - { - switch (rType) - { - case RelationshipType::RetentionLink: return "RetentionLink"; - case RelationshipType::ExecutionLink: return "ExecutionLink"; - case RelationshipType::DataLink: return "DataLink"; - case RelationshipType::LabelLink: return "LabelLink"; - default: return "Unknown"; - } - } - - struct Entity - { - uint64_t m_Guid; - }; - - struct EventClass - { - uint64_t m_Guid; - uint64_t m_NameGuid; - }; - - struct Event - { - uint64_t m_Guid; - uint64_t m_TimeStamp; - uint64_t m_ThreadId; - }; - - struct Label - { - uint64_t m_Guid; - std::string m_Name; - }; - - struct Relationship - { - RelationshipType m_RelationshipType; - uint64_t m_Guid; - uint64_t m_HeadGuid; - uint64_t m_TailGuid; - uint64_t m_AttributeGuid; - }; - - virtual ~ITimelineDecoder() = default; - - virtual TimelineStatus CreateEntity(const Entity&) = 0; - virtual TimelineStatus CreateEventClass(const EventClass&) = 0; - virtual TimelineStatus CreateEvent(const Event&) = 0; - virtual TimelineStatus CreateLabel(const Label&) = 0; - virtual TimelineStatus CreateRelationship(const Relationship&) = 0; -}; \ No newline at end of file diff --git a/include/armnn/utility/Assert.hpp b/include/armnn/utility/Assert.hpp index 455775f9b7..3c336b36f5 100644 --- a/include/armnn/utility/Assert.hpp +++ b/include/armnn/utility/Assert.hpp @@ -1,5 +1,5 @@ // -// Copyright © 2020 Arm Ltd. All rights reserved. +// Copyright © 2020 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // diff --git a/include/armnn/utility/IgnoreUnused.hpp b/include/armnn/utility/IgnoreUnused.hpp index 1f9bbe7a28..1534f774b9 100644 --- a/include/armnn/utility/IgnoreUnused.hpp +++ b/include/armnn/utility/IgnoreUnused.hpp @@ -1,5 +1,5 @@ // -// Copyright © 2020 Arm Ltd. All rights reserved. +// Copyright © 2020 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // diff --git a/include/armnn/utility/NumericCast.hpp b/include/armnn/utility/NumericCast.hpp index 62c7d11543..af34013c30 100644 --- a/include/armnn/utility/NumericCast.hpp +++ b/include/armnn/utility/NumericCast.hpp @@ -1,5 +1,5 @@ // -// Copyright © 2020 Arm Ltd. All rights reserved. +// Copyright © 2020 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // -- cgit v1.2.1