• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
8 #include "ProfilingStateMachine.hpp"
9 #include "INotifyBackends.hpp"
10 
11 #include <common/include/CommandHandlerFunctor.hpp>
12 #include <common/include/Packet.hpp>
13 
14 namespace armnn
15 {
16 
17 namespace profiling
18 {
19 
20 class DeactivateTimelineReportingCommandHandler : public arm::pipe::CommandHandlerFunctor
21 {
22 
23 public:
DeactivateTimelineReportingCommandHandler(uint32_t familyId,uint32_t packetId,uint32_t version,std::atomic<bool> & timelineReporting,ProfilingStateMachine & profilingStateMachine,INotifyBackends & notifyBackends)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 
36     void operator()(const arm::pipe::Packet& packet) override;
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