aboutsummaryrefslogtreecommitdiff
path: root/tests/profiling/gatordmock/MockUtils.hpp
blob: 93fc4080375d2fb066154ddcf5d1e86c96a881ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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