From f4019872c1134c6fcc1d6993e5746f55c1e79208 Mon Sep 17 00:00:00 2001 From: Nikhil Raj Date: Tue, 8 Mar 2022 20:01:38 +0000 Subject: IVGCVSW-6819 Fix the directory structure and broken link to latest docu Signed-off-by: Nikhil Raj Change-Id: I05b559d15faf92c76ff536719693b361316be4f3 --- ..._1_1profiling_1_1_profiling_state_machine.xhtml | 355 +++++++++++++++++++++ 1 file changed, 355 insertions(+) create mode 100644 22.02/classarmnn_1_1profiling_1_1_profiling_state_machine.xhtml (limited to '22.02/classarmnn_1_1profiling_1_1_profiling_state_machine.xhtml') diff --git a/22.02/classarmnn_1_1profiling_1_1_profiling_state_machine.xhtml b/22.02/classarmnn_1_1profiling_1_1_profiling_state_machine.xhtml new file mode 100644 index 0000000000..f1a578a095 --- /dev/null +++ b/22.02/classarmnn_1_1profiling_1_1_profiling_state_machine.xhtml @@ -0,0 +1,355 @@ + + + + + + + + + + + + + +ArmNN: ProfilingStateMachine Class Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  22.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
ProfilingStateMachine Class Reference
+
+
+ +

#include <ProfilingStateMachine.hpp>

+ + + + + + + + + + + + + + + + + +

+Public Member Functions

 ProfilingStateMachine ()
 
 ProfilingStateMachine (ProfilingState state)
 
ProfilingState GetCurrentState () const
 
void TransitionToState (ProfilingState newState)
 
void Reset ()
 
bool IsOneOfStates (ProfilingState state1)
 
template<typename T , typename... Args>
bool IsOneOfStates (T state1, T state2, Args... args)
 
+

Detailed Description

+
+

Definition at line 26 of file ProfilingStateMachine.hpp.

+

Constructor & Destructor Documentation

+ +

◆ ProfilingStateMachine() [1/2]

+ +
+
+ + + + + +
+ + + + + + + +
ProfilingStateMachine ()
+
+inline
+
+
+ +

◆ ProfilingStateMachine() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + +
ProfilingStateMachine (ProfilingState state)
+
+inline
+
+ +

Definition at line 30 of file ProfilingStateMachine.hpp.

+
30 : m_State(state) {}
+
+
+

Member Function Documentation

+ +

◆ GetCurrentState()

+ + + +

◆ IsOneOfStates() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + +
bool IsOneOfStates (ProfilingState state1)
+
+inline
+
+ +

Definition at line 36 of file ProfilingStateMachine.hpp.

+ +

References armnn::IgnoreUnused().

+ +

Referenced by ProfilingStateMachine::TransitionToState().

+
37  {
38  IgnoreUnused(state1);
39  return false;
40  }
void IgnoreUnused(Ts &&...)
+
+
+
+ +

◆ IsOneOfStates() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool IsOneOfStates (state1,
state2,
Args... args 
)
+
+inline
+
+ +

Definition at line 43 of file ProfilingStateMachine.hpp.

+
44  {
45  if (state1 == state2)
46  {
47  return true;
48  }
49  else
50  {
51  return IsOneOfStates(state1, args...);
52  }
53  }
+
+
+
+ +

◆ Reset()

+ +
+
+ + + + + + + +
void Reset ()
+
+
+ +

◆ TransitionToState()

+ +
+
+ + + + + + + + +
void TransitionToState (ProfilingState newState)
+
+ +

Definition at line 36 of file ProfilingStateMachine.cpp.

+ +

References armnn::profiling::Active, ProfilingStateMachine::IsOneOfStates(), armnn::profiling::NotConnected, armnn::profiling::Uninitialised, and armnn::profiling::WaitingForAck.

+ +

Referenced by ProfilingService::GetSendTimelinePacket(), ConnectionAcknowledgedCommandHandler::operator()(), TEST_SUITE(), ProfilingService::TransitionToState(), and ProfilingService::Update().

+
37 {
38  ProfilingState currentState = m_State.load(std::memory_order::memory_order_relaxed);
39 
40  switch (newState)
41  {
43  do
44  {
45  if (!IsOneOfStates(currentState, ProfilingState::Uninitialised))
46  {
47  ThrowStateTransitionException(currentState, newState);
48  }
49  }
50  while (!m_State.compare_exchange_strong(currentState, newState, std::memory_order::memory_order_relaxed));
51  break;
53  do
54  {
57  {
58  ThrowStateTransitionException(currentState, newState);
59  }
60  }
61  while (!m_State.compare_exchange_strong(currentState, newState, std::memory_order::memory_order_relaxed));
62  break;
64  do
65  {
67  {
68  ThrowStateTransitionException(currentState, newState);
69  }
70  }
71  while (!m_State.compare_exchange_strong(currentState, newState, std::memory_order::memory_order_relaxed));
72  break;
74  do
75  {
77  {
78  ThrowStateTransitionException(currentState, newState);
79  }
80  }
81  while (!m_State.compare_exchange_strong(currentState, newState, std::memory_order::memory_order_relaxed));
82  break;
83  default:
84  break;
85  }
86 }
+ + + + + +
+
+
+
The documentation for this class was generated from the following files: +
+
+ + + + -- cgit v1.2.1