aboutsummaryrefslogtreecommitdiff
path: root/tests/profiling/timelineDecoder/ITimelineDecoder.hpp
diff options
context:
space:
mode:
authorFinn Williams <Finn.Williams@arm.com>2020-02-21 11:14:08 +0000
committerJim Flynn <jim.flynn@arm.com>2020-03-02 12:51:36 +0000
commit510f6183d289b176702a18f020449c68be6f1075 (patch)
tree28e8e4f27af5d1ee912c93d47628ec219d37a722 /tests/profiling/timelineDecoder/ITimelineDecoder.hpp
parent4c998993bda1475595be5505690ff4e08dc2389e (diff)
downloadarmnn-510f6183d289b176702a18f020449c68be6f1075.tar.gz
IVGCVSW-4164 Change the callbacks to a C++ pure virtual interface
Signed-off-by: Finn Williams <Finn.Williams@arm.com> Change-Id: I0a15b9f228ceb5a8393a48571b345394c005ee1f
Diffstat (limited to 'tests/profiling/timelineDecoder/ITimelineDecoder.hpp')
-rw-r--r--tests/profiling/timelineDecoder/ITimelineDecoder.hpp68
1 files changed, 68 insertions, 0 deletions
diff --git a/tests/profiling/timelineDecoder/ITimelineDecoder.hpp b/tests/profiling/timelineDecoder/ITimelineDecoder.hpp
new file mode 100644
index 0000000000..7199b38d24
--- /dev/null
+++ b/tests/profiling/timelineDecoder/ITimelineDecoder.hpp
@@ -0,0 +1,68 @@
+//
+// Copyright © 2020 Arm Ltd. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+
+#pragma once
+
+#include <cstdint>
+#include <string>
+
+class ITimelineDecoder
+{
+
+public:
+
+ enum class ErrorCode
+ {
+ ErrorCode_Success,
+ ErrorCode_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).
+ };
+
+ struct Entity
+ {
+ uint64_t m_Guid;
+ };
+
+ struct EventClass
+ {
+ uint64_t m_Guid;
+ };
+
+ 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;
+ };
+
+ virtual ~ITimelineDecoder() = default;
+
+ virtual ErrorCode CreateEntity(const Entity&) = 0;
+ virtual ErrorCode CreateEventClass(const EventClass&) = 0;
+ virtual ErrorCode CreateEvent(const Event&) = 0;
+ virtual ErrorCode CreateLabel(const Label&) = 0;
+ virtual ErrorCode CreateRelationship(const Relationship&) = 0;
+}; \ No newline at end of file