ArmNN
 20.05
ActivateTimelineReportingCommandHandler.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2020 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
10 #include "SendTimelinePacket.hpp"
11 #include "IReportStructure.hpp"
12 #include "INotifyBackends.hpp"
13 
14 #include "armnn/Optional.hpp"
15 
16 #include <Packet.hpp>
17 
18 
19 namespace armnn
20 {
21 
22 namespace profiling
23 {
24 
26 {
27 public:
29  uint32_t packetId,
30  uint32_t version,
31  SendTimelinePacket& sendTimelinePacket,
32  ProfilingStateMachine& profilingStateMachine,
33  Optional<IReportStructure&> reportStructure,
34  std::atomic<bool>& timelineReporting,
35  INotifyBackends& notifyBackends)
36  : CommandHandlerFunctor(familyId, packetId, version),
37  m_SendTimelinePacket(sendTimelinePacket),
38  m_StateMachine(profilingStateMachine),
39  m_TimelineReporting(timelineReporting),
40  m_BackendNotifier(notifyBackends),
41  m_ReportStructure(reportStructure)
42  {}
43 
44  void operator()(const Packet& packet) override;
45 
46 private:
47  SendTimelinePacket& m_SendTimelinePacket;
48  ProfilingStateMachine& m_StateMachine;
49  std::atomic<bool>& m_TimelineReporting;
50  INotifyBackends& m_BackendNotifier;
51 
52  Optional<IReportStructure&> m_ReportStructure;
53 };
54 
55 } // namespace profiling
56 
57 } // namespace armnn
Copyright (c) 2020 ARM Limited.
ActivateTimelineReportingCommandHandler(uint32_t familyId, uint32_t packetId, uint32_t version, SendTimelinePacket &sendTimelinePacket, ProfilingStateMachine &profilingStateMachine, Optional< IReportStructure &> reportStructure, std::atomic< bool > &timelineReporting, INotifyBackends &notifyBackends)