aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/ICounterValues.hpp
diff options
context:
space:
mode:
authorMatteo Martincigh <matteo.martincigh@arm.com>2019-10-04 17:17:42 +0100
committerMatteo Martincigh <matteo.martincigh@arm.com>2019-10-07 10:08:58 +0000
commite0e6efc1072358b843f47d2ffffc3d873a4889c6 (patch)
treef328699a6cbce13f0b64d74692ee92be2a22477a /src/profiling/ICounterValues.hpp
parent8a837179ad883e9b5dd982a25cc5e94f245f79ed (diff)
downloadarmnn-e0e6efc1072358b843f47d2ffffc3d873a4889c6.tar.gz
IVGCVSW-3937 Refactor and improve the PeriodicCounterCapture class
* Conformed the PeriodicCounterCapture class to the other thread-based classes * Code refactoring * Renamed CounterValues file to ICounterValues * Removed no longer used file * Updated unit tests accordingly Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: I8c42aa17e17a90cda5cf86eb8ac2d13501ecdadc
Diffstat (limited to 'src/profiling/ICounterValues.hpp')
-rw-r--r--src/profiling/ICounterValues.hpp45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/profiling/ICounterValues.hpp b/src/profiling/ICounterValues.hpp
new file mode 100644
index 0000000000..5e32ca2b37
--- /dev/null
+++ b/src/profiling/ICounterValues.hpp
@@ -0,0 +1,45 @@
+//
+// Copyright © 2019 Arm Ltd. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+
+#pragma once
+
+#include <cstdint>
+
+namespace armnn
+{
+
+namespace profiling
+{
+
+class IReadCounterValues
+{
+public:
+ virtual ~IReadCounterValues() {}
+
+ virtual uint16_t GetCounterCount() const = 0;
+ virtual uint32_t GetCounterValue(uint16_t counterUid) const = 0;
+};
+
+class IWriteCounterValues
+{
+public:
+ virtual ~IWriteCounterValues() {}
+
+ virtual void SetCounterValue(uint16_t counterUid, uint32_t value) = 0;
+ virtual uint32_t AddCounterValue(uint16_t counterUid, uint32_t value) = 0;
+ virtual uint32_t SubtractCounterValue(uint16_t counterUid, uint32_t value) = 0;
+ virtual uint32_t IncrementCounterValue(uint16_t counterUid) = 0;
+ virtual uint32_t DecrementCounterValue(uint16_t counterUid) = 0;
+};
+
+class IReadWriteCounterValues : public IReadCounterValues, public IWriteCounterValues
+{
+public:
+ virtual ~IReadWriteCounterValues() {}
+};
+
+} // namespace profiling
+
+} // namespace armnn