ArmNN
 20.05
PacketVersionResolver.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
8 #include "EncodeVersion.hpp"
9 
10 namespace armnn
11 {
12 
13 namespace profiling
14 {
15 
16 class PacketKey final
17 {
18 public:
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 
31 private:
32  uint32_t m_FamilyId;
33  uint32_t m_PacketId;
34 };
35 
36 static const PacketKey ActivateTimeLinePacket(0 , 6);
37 static const PacketKey DeactivateTimeLinePacket(0 , 7);
38 
40 {
41 public:
42  PacketVersionResolver() = default;
43  ~PacketVersionResolver() = default;
44 
45  Version ResolvePacketVersion(uint32_t familyId, uint32_t packetId) const;
46 };
47 
48 } // namespace profiling
49 
50 } // namespace armnn
bool operator>(const PacketKey &rhs) const
PacketKey(uint32_t familyId, uint32_t packetId)
Copyright (c) 2020 ARM Limited.
bool operator<=(const PacketKey &rhs) const
bool operator!=(const PacketKey &rhs) const
bool operator<(const PacketKey &rhs) const
bool operator>=(const PacketKey &rhs) const
bool operator==(const PacketKey &rhs) const