aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/ProfilingGuidGenerator.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/profiling/ProfilingGuidGenerator.hpp')
-rw-r--r--src/profiling/ProfilingGuidGenerator.hpp34
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