ArmNN
 20.02
ISendTimelinePacket.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2019 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
8 #include <algorithm>
9 #include <string>
10 #include <thread>
11 #include <vector>
12 
13 namespace armnn
14 {
15 
16 namespace profiling
17 {
18 
20 {
21  RetentionLink, /// Head retains(parents) Tail
22  ExecutionLink, /// Head execution start depends on Tail execution completion
23  DataLink, /// Head uses data of Tail
24  LabelLink /// Head uses label Tail (Tail MUST be a guid of a label).
25 };
26 
28 {
29 public:
31  {}
32 
33  /// Commits the current buffer and reset the member variables
34  virtual void Commit() = 0;
35 
36  /// Create and write a TimelineEntityBinaryPacket from the parameters to the buffer.
37  virtual void SendTimelineEntityBinaryPacket(uint64_t profilingGuid) = 0;
38 
39  /// Create and write a TimelineEventBinaryPacket from the parameters to the buffer.
40  virtual void
41  SendTimelineEventBinaryPacket(uint64_t timestamp, std::thread::id threadId, uint64_t profilingGuid) = 0;
42 
43  /// Create and write a TimelineEventClassBinaryPacket from the parameters to the buffer.
44  virtual void SendTimelineEventClassBinaryPacket(uint64_t profilingGuid) = 0;
45 
46  /// Create and write a TimelineLabelBinaryPacket from the parameters to the buffer.
47  virtual void SendTimelineLabelBinaryPacket(uint64_t profilingGuid, const std::string& label) = 0;
48 
49  /// Create and write a TimelineMessageDirectoryPackage in the buffer
50  virtual void SendTimelineMessageDirectoryPackage() = 0;
51 
52  /// Create and write a TimelineRelationshipBinaryPacket from the parameters to the buffer.
53  virtual void SendTimelineRelationshipBinaryPacket(ProfilingRelationshipType relationshipType,
54  uint64_t relationshipGuid,
55  uint64_t headGuid,
56  uint64_t tailGuid) = 0;
57 };
58 
59 } // namespace profiling
60 
61 } // namespace armnn
Copyright (c) 2020 ARM Limited.
Head execution start depends on Tail execution completion.