aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/PeriodicCounterSelectionCommandHandler.hpp
diff options
context:
space:
mode:
authorFerran Balaguer <ferran.balaguer@arm.com>2019-08-28 16:57:18 +0100
committerFerran Balaguer <ferran.balaguer@arm.com>2019-09-13 09:50:20 +0100
commit1b941728caa2cd7e2148d0872a6b7dda4947b641 (patch)
tree0820663b520604256554f55e4f4bf07ebc6a3fa3 /src/profiling/PeriodicCounterSelectionCommandHandler.hpp
parent9bff14458f9950a5d31b9523c62c0bbf79a65fcf (diff)
downloadarmnn-1b941728caa2cd7e2148d0872a6b7dda4947b641.tar.gz
IVGCVSW-3436 Create the Periodic Counter Selection Command Handler
Change-Id: Ia6fe19db5aebe82bb00dcbab17e16633befda0a5 Signed-off-by: Ferran Balaguer <ferran.balaguer@arm.com>
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
+