blob: 3737e3cfcac789defbbcb32ae62fdeefbe6167a7 [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#include "PacketVersionResolver.hpp"
7
8namespace armnn
9{
10
11namespace profiling
12{
13
Jim Flynned25e0e2019-10-18 13:21:43 +010014bool PacketKey::operator<(const PacketKey& rhs) const
15{
16 bool result = true;
17 if (m_FamilyId == rhs.m_FamilyId)
18 {
19 result = m_PacketId < rhs.m_PacketId;
20 }
21 else if (m_FamilyId > rhs.m_FamilyId)
22 {
23 result = false;
24 }
25 return result;
26}
27
28bool PacketKey::operator>(const PacketKey& rhs) const
29{
30 return rhs < *this;
31}
32
33bool PacketKey::operator<=(const PacketKey& rhs) const
34{
35 return !(*this > rhs);
36}
37
38bool PacketKey::operator>=(const PacketKey& rhs) const
39{
40 return !(*this < rhs);
41}
42
43bool PacketKey::operator==(const PacketKey& rhs) const
44{
45 return m_FamilyId == rhs.m_FamilyId && m_PacketId == rhs.m_PacketId;
46}
47
48bool PacketKey::operator!=(const PacketKey& rhs) const
49{
50 return !(*this == rhs);
51}
52
53Version PacketVersionResolver::ResolvePacketVersion(uint32_t familyId, uint32_t packetId) const
Aron Virginas-Tare898db92019-08-22 12:56:34 +010054{
55 // NOTE: For now every packet specification is at version 1.0.0
56 return Version(1, 0, 0);
57}
58
59} // namespace profiling
60
61} // namespace armnn