diff options
author | FinnWilliamsArm <Finn.Williams@arm.com> | 2019-09-16 12:06:47 +0100 |
---|---|---|
committer | finn.williams <finn.williams@arm.com> | 2019-09-16 14:17:03 +0000 |
commit | a0c7871cf140d1e9cf59a213626ee534c0122c7f (patch) | |
tree | 4f284b6d35a12ea7c471fe3a25682bbac73b4839 /src/profiling/Packet.hpp | |
parent | 027e8b055396816dbb1d78d7c963d5d0af1a9e98 (diff) | |
download | armnn-a0c7871cf140d1e9cf59a213626ee534c0122c7f.tar.gz |
IVGCVSW-3826: Implement IProfiling functions
!armnn:1814
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com>
Signed-off-by: FinnWilliamsArm <Finn.Williams@arm.com>
Change-Id: I82c7453d7969880e321572637adc0fb9c0e5fd7b
Diffstat (limited to 'src/profiling/Packet.hpp')
-rw-r--r-- | src/profiling/Packet.hpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/profiling/Packet.hpp b/src/profiling/Packet.hpp index c5e7f3c029..1e047a6511 100644 --- a/src/profiling/Packet.hpp +++ b/src/profiling/Packet.hpp @@ -17,10 +17,8 @@ namespace profiling class Packet { public: - Packet(uint32_t header, uint32_t length, const char* data) - : m_Header(header), - m_Length(length), - m_Data(data) + Packet(uint32_t header, uint32_t length, std::unique_ptr<char[]>& data) + : m_Header(header), m_Length(length), m_Data(std::move(data)) { m_PacketId = ((header >> 16) & 1023); m_PacketFamily = (header >> 26); @@ -31,11 +29,21 @@ public: } } + Packet(Packet&& other) : + m_Header(other.m_Header), + m_PacketFamily(other.m_PacketFamily), + m_PacketId(other.m_PacketId), + m_Length(other.m_Length), + m_Data(std::move(other.m_Data)){}; + + Packet(const Packet& other) = delete; + Packet& operator=(const Packet&) = delete; + uint32_t GetHeader() const; uint32_t GetPacketFamily() const; uint32_t GetPacketId() const; uint32_t GetLength() const; - const char* GetData() const; + const char* const GetData() const; uint32_t GetPacketClass() const; uint32_t GetPacketType() const; @@ -45,7 +53,7 @@ private: uint32_t m_PacketFamily; uint32_t m_PacketId; uint32_t m_Length; - const char* m_Data; + std::unique_ptr<char[]> m_Data; }; } // namespace profiling |