From 01d0281404183c84d26e863502cac8d83044c0bf Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Wed, 29 Apr 2020 21:12:13 +0100 Subject: IVGCVSW-4595 Change FileOnlyProfilingConnection to all packet processor model Change-Id: Ieccb26190d80e570ddef8d7c22e824eda1b92d7f Signed-off-by: Jim Flynn --- include/armnn/profiling/ILocalPacketHandler.hpp | 28 +++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'include/armnn/profiling/ILocalPacketHandler.hpp') diff --git a/include/armnn/profiling/ILocalPacketHandler.hpp b/include/armnn/profiling/ILocalPacketHandler.hpp index a2b9d5fd56..158c0eb852 100644 --- a/include/armnn/profiling/ILocalPacketHandler.hpp +++ b/include/armnn/profiling/ILocalPacketHandler.hpp @@ -17,9 +17,32 @@ namespace armnn namespace profiling { + +enum class TargetEndianness +{ + BeWire, + LeWire +}; + // forward declare to prevent a circular dependency class Packet; -class IProfilingConnection; + +// the handlers need to be able to do two +// things to service the FileOnlyProfilingConnection +// and any other implementation of IProfilingConnection +// set the endianness and write a packet back i.e. +// return a packet and close the connection +class IInternalProfilingConnection +{ +public: + virtual ~IInternalProfilingConnection() {}; + + virtual void SetEndianess(const TargetEndianness& endianness) = 0; + + virtual void ReturnPacket(Packet& packet) = 0; + + virtual void Close() = 0; +}; class ILocalPacketHandler { @@ -37,7 +60,8 @@ public: /// Set a profiling connection on the handler. Only need to implement this /// function if the handler will be writing data back to the profiled application. - virtual void SetConnection(IProfilingConnection* profilingConnection) {armnn::IgnoreUnused(profilingConnection);} + virtual void SetConnection(IInternalProfilingConnection* profilingConnection) + {armnn::IgnoreUnused(profilingConnection);} }; using ILocalPacketHandlerPtr = std::unique_ptr; -- cgit v1.2.1