aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/Packet.hpp
diff options
context:
space:
mode:
authorMatteo Martincigh <matteo.martincigh@arm.com>2019-09-05 12:02:04 +0100
committerMatteo Martincigh <matteo.martincigh@arm.com>2019-09-09 16:47:50 +0000
commit149528e88c081e71fc7ec78e0c301eb2e487adfc (patch)
treea287157d725f3186c44f9c8f71141cd694333249 /src/profiling/Packet.hpp
parenta85e215dd1b027c5ef88621d1b4d5f6e078605da (diff)
downloadarmnn-149528e88c081e71fc7ec78e0c301eb2e487adfc.tar.gz
IVGCVSW-3691 Basic refactoring in view of upcoming work in the profiler
Change-Id: Iea4550b864fc2adb04a3a2411a7ead06b1f60ab9 Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
Diffstat (limited to 'src/profiling/Packet.hpp')
-rw-r--r--src/profiling/Packet.hpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/profiling/Packet.hpp b/src/profiling/Packet.hpp
index ce378441f4..b350f7c2ca 100644
--- a/src/profiling/Packet.hpp
+++ b/src/profiling/Packet.hpp
@@ -18,19 +18,18 @@ class Packet
{
public:
Packet(uint32_t header, uint32_t length, const char* data)
- : m_Header(header), m_Length(length), m_Data(data)
- {
- m_PacketId = ((header >> 16) & 1023);
- m_PacketFamily = (header >> 26);
-
- if (length == 0)
- {
- if (m_Data != nullptr)
- {
- throw armnn::Exception("Data should be null");
- }
- }
- };
+ : m_Header(header),
+ m_Length(length),
+ m_Data(data)
+ {
+ m_PacketId = ((header >> 16) & 1023);
+ m_PacketFamily = (header >> 26);
+
+ if (length == 0 && m_Data != nullptr)
+ {
+ throw armnn::InvalidArgumentException("Data should be null when length is zero");
+ }
+ }
uint32_t GetHeader() const;
uint32_t GetPacketFamily() const;