diff options
author | Jim Flynn <jim.flynn@arm.com> | 2022-03-23 23:01:26 +0000 |
---|---|---|
committer | Jim Flynn <jim.flynn@arm.com> | 2022-03-23 23:43:35 +0000 |
commit | 3e9bc19ad523361e6b18057849e30c0c48183915 (patch) | |
tree | b7b012a9734ce39d054fc5d92302780fd838e5c8 /src/profiling/ProfilingStateMachine.hpp | |
parent | 277618302d0f131eac0b6ac2015dd3eb09aa6ff9 (diff) | |
download | armnn-3e9bc19ad523361e6b18057849e30c0c48183915.tar.gz |
IVGCVSW-6706 Create the libpipeClient library
Change-Id: I2368aade38ad3808fab55d8a86cd659d4e95d91e
Signed-off-by: Jim Flynn <jim.flynn@arm.com>
Diffstat (limited to 'src/profiling/ProfilingStateMachine.hpp')
-rw-r--r-- | src/profiling/ProfilingStateMachine.hpp | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/src/profiling/ProfilingStateMachine.hpp b/src/profiling/ProfilingStateMachine.hpp deleted file mode 100644 index b507f1a50b..0000000000 --- a/src/profiling/ProfilingStateMachine.hpp +++ /dev/null @@ -1,67 +0,0 @@ -// -// Copyright © 2017 Arm Ltd. All rights reserved. -// SPDX-License-Identifier: MIT -// - -#pragma once - -#include <client/include/ProfilingState.hpp> - -#include <common/include/IgnoreUnused.hpp> - -#include <atomic> - -namespace arm -{ - -namespace pipe -{ - -class ProfilingStateMachine -{ -public: - ProfilingStateMachine() : m_State(ProfilingState::Uninitialised) {} - ProfilingStateMachine(ProfilingState state) : m_State(state) {} - - ProfilingState GetCurrentState() const; - void TransitionToState(ProfilingState newState); - void Reset(); - - bool IsOneOfStates(ProfilingState state1) - { - arm::pipe::IgnoreUnused(state1); - return false; - } - - template<typename T, typename... Args > - bool IsOneOfStates(T state1, T state2, Args... args) - { - if (state1 == state2) - { - return true; - } - else - { - return IsOneOfStates(state1, args...); - } - } - -private: - std::atomic<ProfilingState> m_State; -}; - -constexpr char const* GetProfilingStateName(ProfilingState state) -{ - switch (state) - { - case ProfilingState::Uninitialised: return "Uninitialised"; - case ProfilingState::NotConnected: return "NotConnected"; - case ProfilingState::WaitingForAck: return "WaitingForAck"; - case ProfilingState::Active: return "Active"; - default: return "Unknown"; - } -} - -} // namespace pipe - -} // namespace arm |