blob: 4d7e11a7e0641d485d7a4a36a45a238bdecde737 (
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
//
// Copyright © 2017 Arm Ltd. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "CommandHandlerKey.hpp"
namespace armnn
{
namespace profiling
{
uint32_t CommandHandlerKey::GetFamilyId() const
{
return m_FamilyId;
}
uint32_t CommandHandlerKey::GetPacketId() const
{
return m_PacketId;
}
uint32_t CommandHandlerKey::GetVersion() const
{
return m_Version;
}
bool CommandHandlerKey::operator<(const CommandHandlerKey& rhs) const
{
bool result = true;
if (m_FamilyId == rhs.m_FamilyId)
{
if (m_PacketId == rhs.m_PacketId)
{
result = m_Version < rhs.m_Version;
}
else if (m_PacketId > rhs.m_PacketId)
{
result = false;
}
}
else if (m_FamilyId > rhs.m_FamilyId)
{
result = false;
}
return result;
}
bool CommandHandlerKey::operator>(const CommandHandlerKey& rhs) const
{
return rhs < *this;
}
bool CommandHandlerKey::operator<=(const CommandHandlerKey& rhs) const
{
return !(*this > rhs);
}
bool CommandHandlerKey::operator>=(const CommandHandlerKey& rhs) const
{
return !(*this < rhs);
}
bool CommandHandlerKey::operator==(const CommandHandlerKey& rhs) const
{
return m_FamilyId == rhs.m_FamilyId && m_PacketId == rhs.m_PacketId && m_Version == rhs.m_Version;
}
bool CommandHandlerKey::operator!=(const CommandHandlerKey& rhs) const
{
return !(*this == rhs);
}
} // namespace profiling
} // namespace armnn
|