aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/CounterIdMap.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/profiling/CounterIdMap.hpp')
-rw-r--r--src/profiling/CounterIdMap.hpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/profiling/CounterIdMap.hpp b/src/profiling/CounterIdMap.hpp
new file mode 100644
index 0000000000..e401491c10
--- /dev/null
+++ b/src/profiling/CounterIdMap.hpp
@@ -0,0 +1,28 @@
+//
+// Copyright © 2020 Arm Ltd. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+#pragma once
+
+#include "armnn/BackendId.hpp"
+#include <map>
+
+namespace armnn
+{
+namespace profiling
+{
+
+class CounterIdMap
+{
+
+public:
+ void RegisterMapping(uint16_t globalCounterId, uint16_t backendCounterId, const armnn::BackendId& backendId);
+ uint16_t GetGlobalId(uint16_t backendCounterId, const armnn::BackendId& backendId);
+ const std::pair<uint16_t, armnn::BackendId>& GetBackendId(uint16_t globalCounterId);
+private:
+ std::map<uint16_t, std::pair<uint16_t, armnn::BackendId>> m_GlobalCounterIdMap;
+ std::map<std::pair<uint16_t, armnn::BackendId>, uint16_t> m_BackendCounterIdMap;
+};
+
+} // namespace profiling
+} // namespace armnn \ No newline at end of file