Keith Davis | 33ed221 | 2020-03-30 10:43:41 +0100 | [diff] [blame] | 1 | // |
Jim Flynn | bbfe603 | 2020-07-20 16:57:44 +0100 | [diff] [blame] | 2 | // Copyright © 2020 Arm Ltd and Contributors. All rights reserved. |
Keith Davis | 33ed221 | 2020-03-30 10:43:41 +0100 | [diff] [blame] | 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #pragma once |
| 7 | |
Keith Davis | 33ed221 | 2020-03-30 10:43:41 +0100 | [diff] [blame] | 8 | #include "ProfilingStateMachine.hpp" |
| 9 | #include "INotifyBackends.hpp" |
| 10 | |
Jim Flynn | bbfe603 | 2020-07-20 16:57:44 +0100 | [diff] [blame] | 11 | #include <common/include/CommandHandlerFunctor.hpp> |
| 12 | #include <common/include/Packet.hpp> |
| 13 | |
Keith Davis | 33ed221 | 2020-03-30 10:43:41 +0100 | [diff] [blame] | 14 | namespace armnn |
| 15 | { |
| 16 | |
| 17 | namespace profiling |
| 18 | { |
| 19 | |
Jim Flynn | bbfe603 | 2020-07-20 16:57:44 +0100 | [diff] [blame] | 20 | class DeactivateTimelineReportingCommandHandler : public arm::pipe::CommandHandlerFunctor |
Keith Davis | 33ed221 | 2020-03-30 10:43:41 +0100 | [diff] [blame] | 21 | { |
| 22 | |
| 23 | public: |
| 24 | DeactivateTimelineReportingCommandHandler(uint32_t familyId, |
| 25 | uint32_t packetId, |
| 26 | uint32_t version, |
| 27 | std::atomic<bool>& timelineReporting, |
| 28 | ProfilingStateMachine& profilingStateMachine, |
| 29 | INotifyBackends& notifyBackends) |
| 30 | : CommandHandlerFunctor(familyId, packetId, version) |
| 31 | , m_TimelineReporting(timelineReporting) |
| 32 | , m_StateMachine(profilingStateMachine) |
| 33 | , m_BackendNotifier(notifyBackends) |
| 34 | {} |
| 35 | |
Jim Flynn | bbfe603 | 2020-07-20 16:57:44 +0100 | [diff] [blame] | 36 | void operator()(const arm::pipe::Packet& packet) override; |
Keith Davis | 33ed221 | 2020-03-30 10:43:41 +0100 | [diff] [blame] | 37 | |
| 38 | private: |
| 39 | std::atomic<bool>& m_TimelineReporting; |
| 40 | ProfilingStateMachine& m_StateMachine; |
| 41 | INotifyBackends& m_BackendNotifier; |
| 42 | }; |
| 43 | |
| 44 | } // namespace profiling |
| 45 | |
| 46 | } // namespace armnn |