diff options
author | Narumol Prangnawarat <narumol.prangnawarat@arm.com> | 2019-10-22 14:17:11 +0100 |
---|---|---|
committer | Narumol Prangnawarat <narumol.prangnawarat@arm.com> | 2019-10-22 14:23:50 +0100 |
commit | 15effd8806e77c226b55e546bb44110177383fab (patch) | |
tree | f55a1b6d57905849bdb442f65b555e2c7b973e93 /src/profiling/ProfilingGuidGenerator.hpp | |
parent | 6d2e6594cccde1dae2f52ab25e57d529c4c1d32e (diff) | |
download | armnn-15effd8806e77c226b55e546bb44110177383fab.tar.gz |
IVGCVSW-3980 Add ProfilingGuid and ProfilingGuidGenerator API
* ProfilingGuid
* ProfilingDynamicGuid
* ProfilingStaticGuid
* ProfilingGuidGenerator API
* Unit tests
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com>
Change-Id: If950415f059d07d34cf64e13a9b4663dd032ec34
Diffstat (limited to 'src/profiling/ProfilingGuidGenerator.hpp')
-rw-r--r-- | src/profiling/ProfilingGuidGenerator.hpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/profiling/ProfilingGuidGenerator.hpp b/src/profiling/ProfilingGuidGenerator.hpp new file mode 100644 index 0000000000..7c43cab67b --- /dev/null +++ b/src/profiling/ProfilingGuidGenerator.hpp @@ -0,0 +1,34 @@ +// +// Copyright © 2019 Arm Ltd. All rights reserved. +// SPDX-License-Identifier: MIT +// + +#pragma once + +#include "ProfilingGuid.hpp" + +namespace armnn +{ + +namespace profiling +{ + +class ProfilingGuidGenerator +{ +public: + /// Construct a generator with the default address space static/dynamic partitioning + ProfilingGuidGenerator() : m_Sequence(0) {} + + /// Return the next random Guid in the sequence + ProfilingDynamicGuid NextGuid(); + + /// Create a ProfilingStaticGuid based on a hash of the name + ProfilingStaticGuid GenerateStaticId(const char* name); + +private: + uint64_t m_Sequence; +}; + +} // namespace profiling + +} // namespace armnn |