ArmNN
 20.02
PacketVersionResolver.cpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
7 
9 
10 namespace armnn
11 {
12 
13 namespace profiling
14 {
15 
16 bool PacketKey::operator<(const PacketKey& rhs) const
17 {
18  bool result = true;
19  if (m_FamilyId == rhs.m_FamilyId)
20  {
21  result = m_PacketId < rhs.m_PacketId;
22  }
23  else if (m_FamilyId > rhs.m_FamilyId)
24  {
25  result = false;
26  }
27  return result;
28 }
29 
30 bool PacketKey::operator>(const PacketKey& rhs) const
31 {
32  return rhs < *this;
33 }
34 
35 bool PacketKey::operator<=(const PacketKey& rhs) const
36 {
37  return !(*this > rhs);
38 }
39 
40 bool PacketKey::operator>=(const PacketKey& rhs) const
41 {
42  return !(*this < rhs);
43 }
44 
45 bool PacketKey::operator==(const PacketKey& rhs) const
46 {
47  return m_FamilyId == rhs.m_FamilyId && m_PacketId == rhs.m_PacketId;
48 }
49 
50 bool PacketKey::operator!=(const PacketKey& rhs) const
51 {
52  return !(*this == rhs);
53 }
54 
55 Version PacketVersionResolver::ResolvePacketVersion(uint32_t familyId, uint32_t packetId) const
56 {
57  IgnoreUnused(familyId, packetId);
58  // NOTE: For now every packet specification is at version 1.0.0
59  return Version(1, 0, 0);
60 }
61 
62 } // namespace profiling
63 
64 } // namespace armnn
bool operator>(const PacketKey &rhs) const
Version ResolvePacketVersion(uint32_t familyId, uint32_t packetId) const
Copyright (c) 2020 ARM Limited.
void IgnoreUnused(Ts &&...)
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