aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/PeriodicCounterSelectionCommandHandler.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/profiling/PeriodicCounterSelectionCommandHandler.hpp')
-rw-r--r--src/profiling/PeriodicCounterSelectionCommandHandler.hpp50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/profiling/PeriodicCounterSelectionCommandHandler.hpp b/src/profiling/PeriodicCounterSelectionCommandHandler.hpp
new file mode 100644
index 0000000000..e247e7773f
--- /dev/null
+++ b/src/profiling/PeriodicCounterSelectionCommandHandler.hpp
@@ -0,0 +1,50 @@
+//
+// Copyright © 2019 Arm Ltd. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+
+#pragma once
+
+#include "Packet.hpp"
+#include "CommandHandlerFunctor.hpp"
+#include "Holder.hpp"
+#include "SendCounterPacket.hpp"
+#include "IPeriodicCounterCapture.hpp"
+
+#include <vector>
+#include <thread>
+#include <atomic>
+
+namespace armnn
+{
+
+namespace profiling
+{
+
+class PeriodicCounterSelectionCommandHandler : public CommandHandlerFunctor
+{
+
+public:
+ PeriodicCounterSelectionCommandHandler(uint32_t packetId, uint32_t version, Holder& captureDataHolder,
+ IPeriodicCounterCapture& captureThread,
+ ISendCounterPacket& sendCounterPacket)
+ : CommandHandlerFunctor(packetId, version),
+ m_CaptureDataHolder(captureDataHolder),
+ m_CaptureThread(captureThread),
+ m_SendCounterPacket(sendCounterPacket)
+ {}
+
+ void operator()(const Packet& packet) override;
+
+
+private:
+ Holder& m_CaptureDataHolder;
+ IPeriodicCounterCapture& m_CaptureThread;
+ ISendCounterPacket& m_SendCounterPacket;
+ void ParseData(const Packet& packet, CaptureData& captureData);
+};
+
+} // namespace profiling
+
+} // namespace armnn
+