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