blob: 3112f5eac0e58b5c4a19d5bfca2aaa9d22f0de3b [file] [log] [blame]
Aron Virginas-Tare898db92019-08-22 12:56:34 +01001//
2// Copyright © 2017 Arm Ltd. All rights reserved.
3// SPDX-License-Identifier: MIT
4//
5
6#pragma once
7
8#include "EncodeVersion.hpp"
9
10namespace armnn
11{
12
13namespace profiling
14{
15
Jim Flynned25e0e2019-10-18 13:21:43 +010016class PacketKey final
17{
18public:
19 PacketKey(uint32_t familyId, uint32_t packetId) : m_FamilyId(familyId), m_PacketId(packetId) {}
20
21 uint32_t GetFamilyId() { return m_FamilyId; }
22 uint32_t GetPacketId() { return m_PacketId; }
23
24 bool operator< (const PacketKey& rhs) const;
25 bool operator> (const PacketKey& rhs) const;
26 bool operator<=(const PacketKey& rhs) const;
27 bool operator>=(const PacketKey& rhs) const;
28 bool operator==(const PacketKey& rhs) const;
29 bool operator!=(const PacketKey& rhs) const;
30
31private:
32 uint32_t m_FamilyId;
33 uint32_t m_PacketId;
34};
35
Keith Davis33ed2212020-03-30 10:43:41 +010036static const PacketKey ActivateTimeLinePacket(0 , 6);
Finn Williams2ed809c2020-04-20 21:21:07 +010037static const PacketKey DeactivateTimeLinePacket(0 , 7);
Keith Davis33ed2212020-03-30 10:43:41 +010038
Aron Virginas-Tare898db92019-08-22 12:56:34 +010039class PacketVersionResolver final
40{
41public:
42 PacketVersionResolver() = default;
43 ~PacketVersionResolver() = default;
44
Jim Flynned25e0e2019-10-18 13:21:43 +010045 Version ResolvePacketVersion(uint32_t familyId, uint32_t packetId) const;
Aron Virginas-Tare898db92019-08-22 12:56:34 +010046};
47
48} // namespace profiling
49
50} // namespace armnn