diff options
author | Finn Williams <Finn.Williams@arm.com> | 2020-02-26 10:25:26 +0000 |
---|---|---|
committer | Jim Flynn <jim.flynn@arm.com> | 2020-03-04 14:24:29 +0000 |
commit | 8a2b4685fde869c46ad4ebb19cbfefc4adc2a654 (patch) | |
tree | 4f4c87fe502ebbc595ff60ee588183e3b230ad7c /src/timelineDecoder/TimelineCaptureCommandHandler.hpp | |
parent | a97a0be5f16cb876d7226b733ac6aaa3b79dabd3 (diff) | |
download | armnn-8a2b4685fde869c46ad4ebb19cbfefc4adc2a654.tar.gz |
IVGCVSW-4160 Make the ARM Developer Studio code a self contained build entity
!armnn:2773
Signed-off-by: Finn Williams <Finn.Williams@arm.com>
Change-Id: I246cf0de04a1d29dd135cb0fc7e55bc5f0d4b854
Diffstat (limited to 'src/timelineDecoder/TimelineCaptureCommandHandler.hpp')
-rw-r--r-- | src/timelineDecoder/TimelineCaptureCommandHandler.hpp | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/src/timelineDecoder/TimelineCaptureCommandHandler.hpp b/src/timelineDecoder/TimelineCaptureCommandHandler.hpp new file mode 100644 index 0000000000..d95adc0321 --- /dev/null +++ b/src/timelineDecoder/TimelineCaptureCommandHandler.hpp @@ -0,0 +1,57 @@ +// +// Copyright © 2019 Arm Ltd. All rights reserved. +// SPDX-License-Identifier: MIT +// + +#pragma once + +#include <CommandHandlerFunctor.hpp> +#include "armnn/profiling/ITimelineDecoder.hpp" + +#include <Packet.hpp> +#include <ProfilingUtils.hpp> + +namespace armnn +{ + +namespace timelinedecoder +{ + +class TimelineCaptureCommandHandler : public profiling::CommandHandlerFunctor +{ + // Utils + uint32_t uint32_t_size = sizeof(uint32_t); + uint32_t uint64_t_size = sizeof(uint64_t); + + using ReadFunction = void (TimelineCaptureCommandHandler::*)(const unsigned char*, uint32_t); + +public: + TimelineCaptureCommandHandler(uint32_t familyId, + uint32_t packetId, + uint32_t version, + ITimelineDecoder& timelineDecoder, + uint32_t threadId_size) + : CommandHandlerFunctor(familyId, packetId, version) + , m_TimelineDecoder(timelineDecoder) + , m_ThreadIdSize(threadId_size) + {} + + void operator()(const armnn::profiling::Packet& packet) override; + + void ReadLabel(const unsigned char* data, uint32_t offset); + void ReadEntity(const unsigned char* data, uint32_t offset); + void ReadEventClass(const unsigned char* data, uint32_t offset); + void ReadRelationship(const unsigned char* data, uint32_t offset); + void ReadEvent(const unsigned char* data, uint32_t offset); + +private: + void ParseData(const armnn::profiling::Packet& packet); + + ITimelineDecoder& m_TimelineDecoder; + const uint32_t m_ThreadIdSize; + static const ReadFunction m_ReadFunctions[]; +}; + +} //namespace gatordmock + +} //namespace armnn |