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 --- ...sarmnn_1_1_mock_backend_profiling_context.xhtml | 431 +++++++++++++++++++++ 1 file changed, 431 insertions(+) create mode 100644 21.02/classarmnn_1_1_mock_backend_profiling_context.xhtml (limited to '21.02/classarmnn_1_1_mock_backend_profiling_context.xhtml') diff --git a/21.02/classarmnn_1_1_mock_backend_profiling_context.xhtml b/21.02/classarmnn_1_1_mock_backend_profiling_context.xhtml new file mode 100644 index 0000000000..385997b1bd --- /dev/null +++ b/21.02/classarmnn_1_1_mock_backend_profiling_context.xhtml @@ -0,0 +1,431 @@ + + + + + + + + + + + + + +ArmNN: MockBackendProfilingContext Class Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  21.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
MockBackendProfilingContext Class Reference
+
+
+ +

#include <MockBackend.hpp>

+
+Inheritance diagram for MockBackendProfilingContext:
+
+
+ + +IBackendProfilingContext + +
+ + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 MockBackendProfilingContext (IBackendInternal::IBackendProfilingPtr &backendProfiling)
 
 ~MockBackendProfilingContext ()=default
 
IBackendInternal::IBackendProfilingPtrGetBackendProfiling ()
 
uint16_t RegisterCounters (uint16_t currentMaxGlobalCounterId)
 
Optional< std::string > ActivateCounters (uint32_t capturePeriod, const std::vector< uint16_t > &counterIds)
 
std::vector< profiling::TimestampReportCounterValues ()
 
bool EnableProfiling (bool)
 
bool EnableTimelineReporting (bool isEnabled)
 
bool TimelineReportingEnabled ()
 
- Public Member Functions inherited from IBackendProfilingContext
virtual ~IBackendProfilingContext ()
 
+

Detailed Description

+
+

Definition at line 29 of file MockBackend.hpp.

+

Constructor & Destructor Documentation

+ +

◆ MockBackendProfilingContext()

+ +
+
+ + + + + +
+ + + + + + + + +
MockBackendProfilingContext (IBackendInternal::IBackendProfilingPtrbackendProfiling)
+
+inline
+
+ +

Definition at line 32 of file MockBackend.hpp.

+
33  : m_BackendProfiling(std::move(backendProfiling))
34  , m_CapturePeriod(0)
35  , m_IsTimelineEnabled(true)
36  {}
+
+
+ +

◆ ~MockBackendProfilingContext()

+ +
+
+ + + + + +
+ + + + + + + +
~MockBackendProfilingContext ()
+
+default
+
+ +
+
+

Member Function Documentation

+ +

◆ ActivateCounters()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Optional<std::string> ActivateCounters (uint32_t capturePeriod,
const std::vector< uint16_t > & counterIds 
)
+
+inlinevirtual
+
+ +

Implements IBackendProfilingContext.

+ +

Definition at line 65 of file MockBackend.hpp.

+
66  {
67  if (capturePeriod == 0 || counterIds.size() == 0)
68  {
69  m_ActiveCounters.clear();
70  }
71  else if (capturePeriod == 15939u)
72  {
73  return armnn::Optional<std::string>("ActivateCounters example test error");
74  }
75  m_CapturePeriod = capturePeriod;
76  m_ActiveCounters = counterIds;
78  }
+
+
+
+ +

◆ EnableProfiling()

+ +
+
+ + + + + +
+ + + + + + + + +
bool EnableProfiling (bool )
+
+inlinevirtual
+
+ +

Implements IBackendProfilingContext.

+ +

Definition at line 93 of file MockBackend.hpp.

+
94  {
95  auto sendTimelinePacket = m_BackendProfiling->GetSendTimelinePacket();
96  sendTimelinePacket->SendTimelineEntityBinaryPacket(4256);
97  sendTimelinePacket->Commit();
98  return true;
99  }
+
+
+ +

◆ EnableTimelineReporting()

+ +
+
+ + + + + +
+ + + + + + + + +
bool EnableTimelineReporting (bool isEnabled)
+
+inlinevirtual
+
+ +

Implements IBackendProfilingContext.

+ +

Definition at line 101 of file MockBackend.hpp.

+
102  {
103  m_IsTimelineEnabled = isEnabled;
104  return isEnabled;
105  }
+
+
+ +

◆ GetBackendProfiling()

+ +
+
+ + + + + +
+ + + + + + + +
IBackendInternal::IBackendProfilingPtr& GetBackendProfiling ()
+
+inline
+
+ +

Definition at line 40 of file MockBackend.hpp.

+ +

Referenced by BOOST_AUTO_TEST_CASE().

+
41  {
42  return m_BackendProfiling;
43  }
+
+
+ +

◆ RegisterCounters()

+ +
+
+ + + + + +
+ + + + + + + + +
uint16_t RegisterCounters (uint16_t currentMaxGlobalCounterId)
+
+inlinevirtual
+
+ +

Implements IBackendProfilingContext.

+ +

Definition at line 45 of file MockBackend.hpp.

+
46  {
47  std::unique_ptr<profiling::IRegisterBackendCounters> counterRegistrar =
48  m_BackendProfiling->GetCounterRegistrationInterface(static_cast<uint16_t>(currentMaxGlobalCounterId));
49 
50  std::string categoryName("MockCounters");
51  counterRegistrar->RegisterCategory(categoryName);
52 
53  counterRegistrar->RegisterCounter(0, categoryName, 0, 0, 1.f, "Mock Counter One", "Some notional counter");
54 
55  counterRegistrar->RegisterCounter(1, categoryName, 0, 0, 1.f, "Mock Counter Two",
56  "Another notional counter");
57 
58  std::string units("microseconds");
59  uint16_t nextMaxGlobalCounterId =
60  counterRegistrar->RegisterCounter(2, categoryName, 0, 0, 1.f, "Mock MultiCore Counter",
61  "A dummy four core counter", units, 4);
62  return nextMaxGlobalCounterId;
63  }
+
+
+ +

◆ ReportCounterValues()

+ +
+
+ + + + + +
+ + + + + + + +
std::vector<profiling::Timestamp> ReportCounterValues ()
+
+inlinevirtual
+
+ +

Implements IBackendProfilingContext.

+ +

Definition at line 80 of file MockBackend.hpp.

+
81  {
82  std::vector<profiling::CounterValue> counterValues;
83 
84  for (auto counterId : m_ActiveCounters)
85  {
86  counterValues.emplace_back(profiling::CounterValue{ counterId, counterId + 1u });
87  }
88 
89  uint64_t timestamp = m_CapturePeriod;
90  return { profiling::Timestamp{ timestamp, counterValues } };
91  }
+
+
+ +

◆ TimelineReportingEnabled()

+ +
+
+ + + + + +
+ + + + + + + +
bool TimelineReportingEnabled ()
+
+inline
+
+ +

Definition at line 107 of file MockBackend.hpp.

+ +

Referenced by BOOST_AUTO_TEST_CASE().

+
108  {
109  return m_IsTimelineEnabled;
110  }
+
+
+
The documentation for this class was generated from the following file: +
+
+ + + + -- cgit v1.2.1