diff options
author | David Monahan <david.monahan@arm.com> | 2020-01-30 12:44:23 +0000 |
---|---|---|
committer | David Monahan <david.monahan@arm.com> | 2020-01-30 12:58:58 +0000 |
commit | de80307c06986cc53cd1bd5a62fc08af1de7610f (patch) | |
tree | 21901cab5ff9dc83de680356f48e285cc3594cd3 /src/profiling/CounterIdMap.hpp | |
parent | 9308f6033547836007bd597fbe35b4c8d15105d7 (diff) | |
download | armnn-de80307c06986cc53cd1bd5a62fc08af1de7610f.tar.gz |
IVGCVSW-4391 Add Global/Backend Counter ID map
Signed-off-by: David Monahan <david.monahan@arm.com>
Change-Id: I943e02bc2026564e3a19d03e81ba75850d204497
Diffstat (limited to 'src/profiling/CounterIdMap.hpp')
-rw-r--r-- | src/profiling/CounterIdMap.hpp | 28 |
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 |