From fd627ffaec8fd8801d980b4c91ee7c0607ab6aaf Mon Sep 17 00:00:00 2001 From: Jan Eilers Date: Thu, 25 Feb 2021 17:44:00 +0000 Subject: IVGCVSW-5687 Update Doxygen Docu * Update Doxygen Documentation for 21.02 release Signed-off-by: Jan Eilers Change-Id: I9ed2f9caab038836ea99d7b378d7899fe431a4e5 --- ...ctory_capture_command_handler_8hpp_source.xhtml | 134 +++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 21.02/_directory_capture_command_handler_8hpp_source.xhtml (limited to '21.02/_directory_capture_command_handler_8hpp_source.xhtml') diff --git a/21.02/_directory_capture_command_handler_8hpp_source.xhtml b/21.02/_directory_capture_command_handler_8hpp_source.xhtml new file mode 100644 index 0000000000..a4e22d7675 --- /dev/null +++ b/21.02/_directory_capture_command_handler_8hpp_source.xhtml @@ -0,0 +1,134 @@ + + + + + + + + + + + + + +ArmNN: src/profiling/DirectoryCaptureCommandHandler.hpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  21.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
DirectoryCaptureCommandHandler.hpp
+
+
+Go to the documentation of this file.
1 //
2 // Copyright © 2019 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
8 #include "CounterDirectory.hpp"
9 
10 #include <common/include/CommandHandlerFunctor.hpp>
11 
12 #include <atomic>
13 
14 namespace armnn
15 {
16 
17 namespace profiling
18 {
19 
21 {
22  uint16_t m_CounterClass;
23  std::string m_CounterDescription;
26  std::string m_CounterName;
27  uint16_t m_CounterSetUid;
28  uint16_t m_CounterUid;
30  uint16_t m_DeviceUid;
31  uint16_t m_MaxCounterUid;
32 };
33 
34 class DirectoryCaptureCommandHandler : public arm::pipe::CommandHandlerFunctor
35 {
36 
37 public:
38  DirectoryCaptureCommandHandler(uint32_t familyId, uint32_t packetId, uint32_t version, bool quietOperation = true)
39  : CommandHandlerFunctor(familyId, packetId, version)
40  , m_QuietOperation(quietOperation)
41  , m_AlreadyParsed(false)
42  {}
43 
44  void operator()(const arm::pipe::Packet& packet) override;
45 
46  const ICounterDirectory& GetCounterDirectory() const;
47 
49  {
50  return m_AlreadyParsed.load();
51  }
52 
53  /**
54  * Given a Uid that came from a copy of the counter directory translate it to the original.
55  *
56  * @param copyUid
57  * @return the original Uid that the copy maps to.
58  */
59  uint16_t TranslateUIDCopyToOriginal(uint16_t copyUid)
60  {
61  return m_UidTranslation[copyUid];
62  }
63 
64 private:
65  void ParseData(const arm::pipe::Packet& packet);
66 
67  void ReadCategoryRecords(const unsigned char* data, uint32_t offset, std::vector<uint32_t> categoryOffsets);
68 
69  std::vector<CounterDirectoryEventRecord>
70  ReadEventRecords(const unsigned char* data, uint32_t offset, std::vector<uint32_t> eventRecordsOffsets);
71 
72  std::string GetStringNameFromBuffer(const unsigned char* data, uint32_t offset);
73  bool IsValidChar(unsigned char c);
74 
75  CounterDirectory m_CounterDirectory;
76  std::unordered_map<uint16_t, uint16_t> m_UidTranslation;
77  bool m_QuietOperation;
78  // We can only parse the counter directory once per instance. It won't change anyway as it's static
79  // per instance of ArmNN.
80  std::atomic<bool> m_AlreadyParsed;
81 };
82 
83 } // namespace profiling
84 
85 } // namespace armnn
+ +
DirectoryCaptureCommandHandler(uint32_t familyId, uint32_t packetId, uint32_t version, bool quietOperation=true)
+ +
uint16_t TranslateUIDCopyToOriginal(uint16_t copyUid)
Given a Uid that came from a copy of the counter directory translate it to the original.
+ +
DataLayout::NCHW false
+ + +
Copyright (c) 2021 ARM Limited and Contributors.
+ + + + + + + + + + + +
+
+ + + + -- cgit v1.2.1