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 --- ..._acknowledged_command_handler_8cpp_source.xhtml | 135 +++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 21.02/_connection_acknowledged_command_handler_8cpp_source.xhtml (limited to '21.02/_connection_acknowledged_command_handler_8cpp_source.xhtml') diff --git a/21.02/_connection_acknowledged_command_handler_8cpp_source.xhtml b/21.02/_connection_acknowledged_command_handler_8cpp_source.xhtml new file mode 100644 index 0000000000..aa30e93125 --- /dev/null +++ b/21.02/_connection_acknowledged_command_handler_8cpp_source.xhtml @@ -0,0 +1,135 @@ + + + + + + + + + + + + + +ArmNN: src/profiling/ConnectionAcknowledgedCommandHandler.cpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  21.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
ConnectionAcknowledgedCommandHandler.cpp
+
+
+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 
8 
9 #include <armnn/Exceptions.hpp>
10 
11 #include <fmt/format.h>
12 
13 namespace armnn
14 {
15 
16 namespace profiling
17 {
18 
19 void ConnectionAcknowledgedCommandHandler::operator()(const arm::pipe::Packet& packet)
20 {
21  ProfilingState currentState = m_StateMachine.GetCurrentState();
22  switch (currentState)
23  {
26  throw RuntimeException(fmt::format("Connection Acknowledged Command Handler invoked while in an "
27  "wrong state: {}",
28  GetProfilingStateName(currentState)));
30  // Process the packet
31  if (!(packet.GetPacketFamily() == 0u && packet.GetPacketId() == 1u))
32  {
33  throw armnn::InvalidArgumentException(fmt::format("Expected Packet family = 0, id = 1 but "
34  "received family = {}, id = {}",
35  packet.GetPacketFamily(),
36  packet.GetPacketId()));
37  }
38 
39  // Once a Connection Acknowledged packet has been received, move to the Active state immediately
41  // Send the counter directory packet.
42  m_SendCounterPacket.SendCounterDirectoryPacket(m_CounterDirectory);
43 
44  if (m_TimelineEnabled)
45  {
46  m_SendTimelinePacket.SendTimelineMessageDirectoryPackage();
48  }
49 
50  if (m_BackendProfilingContext.has_value())
51  {
52  for (auto backendContext : m_BackendProfilingContext.value())
53  {
54  // Enable profiling on the backend and assert that it returns true
55  if(!backendContext.second->EnableProfiling(true))
56  {
58  "Unable to enable profiling on Backend Id: " + backendContext.first.Get());
59  }
60  }
61  }
62 
63  // At this point signal any external processes waiting on the profiling system
64  // to come up that profiling is fully active
65  m_ProfilingServiceStatus.NotifyProfilingServiceActive();
66  break;
68  return; // NOP
69  default:
70  throw RuntimeException(fmt::format("Unknown profiling service state: {}",
71  static_cast<int>(currentState)));
72  }
73 }
74 
75 } // namespace profiling
76 
77 } // namespace armnn
78 
+ + +
Copyright (c) 2021 ARM Limited and Contributors.
+ + + +
bool has_value() const noexcept
Definition: Optional.hpp:53
+ + + + + + + + + +
void TransitionToState(ProfilingState newState)
+
static void SendWellKnownLabelsAndEventClasses(ISendTimelinePacket &timelinePacket)
+
virtual void SendCounterDirectoryPacket(const ICounterDirectory &counterDirectory)=0
Create and write a CounterDirectoryPacket from the parameters to the buffer.
+
virtual void SendTimelineMessageDirectoryPackage()=0
Create and write a TimelineMessageDirectoryPackage in the buffer.
+
constexpr char const * GetProfilingStateName(ProfilingState state)
+
+
+ + + + -- cgit v1.2.1