aboutsummaryrefslogtreecommitdiff
path: root/tests/profiling/gatordmock/MockUtils.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/profiling/gatordmock/MockUtils.hpp')
-rw-r--r--tests/profiling/gatordmock/MockUtils.hpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/profiling/gatordmock/MockUtils.hpp b/tests/profiling/gatordmock/MockUtils.hpp
new file mode 100644
index 0000000000..93fc408037
--- /dev/null
+++ b/tests/profiling/gatordmock/MockUtils.hpp
@@ -0,0 +1,35 @@
+//
+// Copyright © 2017 Arm Ltd. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+
+#pragma once
+
+#include <EncodeVersion.hpp>
+
+namespace armnn
+{
+
+namespace gatordmock
+{
+
+
+uint32_t ConstructHeader(uint32_t packetFamily,
+ uint32_t packetClass,
+ uint32_t packetType)
+{
+ return ((packetFamily & 0x3F) << 26)|
+ ((packetClass & 0x3FF) << 19)|
+ ((packetType & 0x3FFF) << 16);
+}
+
+uint32_t ConstructHeader(uint32_t packetFamily,
+ uint32_t packetId)
+{
+ return ((packetFamily & 0x3F) << 26)|
+ ((packetId & 0x3FF) << 16);
+}
+
+} // gatordmock
+
+} // armnn