diff options
author | Sadik Armagan <sadik.armagan@arm.com> | 2020-03-18 10:57:30 +0000 |
---|---|---|
committer | Sadik Armagan <sadik.armagan@arm.com> | 2020-03-18 15:48:21 +0000 |
commit | 3184c907b2420e6c66485529f336251b2b62aecf (patch) | |
tree | b79190007f80da9bb9d827efb714ce13a0ffb2bb /src/profiling/TimelineUtilityMethods.hpp | |
parent | e6a2ccd09060ba93203ddc5a7f79260cedf2c147 (diff) | |
download | armnn-3184c907b2420e6c66485529f336251b2b62aecf.tar.gz |
IVGCVSW-4463 Change ProfilingService to a member of runtime from a singleton
Signed-off-by: Sadik Armagan <sadik.armagan@arm.com>
Change-Id: I345c39a10a4693a500aa1687d9a5cee76da791c3
Diffstat (limited to 'src/profiling/TimelineUtilityMethods.hpp')
-rw-r--r-- | src/profiling/TimelineUtilityMethods.hpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/profiling/TimelineUtilityMethods.hpp b/src/profiling/TimelineUtilityMethods.hpp index c33dd92193..df56cd6f42 100644 --- a/src/profiling/TimelineUtilityMethods.hpp +++ b/src/profiling/TimelineUtilityMethods.hpp @@ -5,7 +5,9 @@ #pragma once +#include "ProfilingService.hpp" #include "armnn/profiling/ISendTimelinePacket.hpp" + #include <armnn/Types.hpp> namespace armnn @@ -20,13 +22,14 @@ public: // static factory method which will return a pointer to a timelie utility methods // object if profiling is enabled. Otherwise will return a null unique_ptr - static std::unique_ptr<TimelineUtilityMethods> GetTimelineUtils(); + static std::unique_ptr<TimelineUtilityMethods> GetTimelineUtils(ProfilingService& profilingService); - TimelineUtilityMethods(std::unique_ptr<ISendTimelinePacket>& sendTimelinePacket) - : m_SendTimelinePacket(std::move(sendTimelinePacket)) {} + TimelineUtilityMethods( + std::unique_ptr<ISendTimelinePacket>& sendTimelinePacket, ProfilingService& profilingService) + : m_SendTimelinePacket(std::move(sendTimelinePacket)), m_ProfilingService(profilingService) {} TimelineUtilityMethods(TimelineUtilityMethods&& other) - : m_SendTimelinePacket(std::move(other.m_SendTimelinePacket)) {} + : m_SendTimelinePacket(std::move(other.m_SendTimelinePacket)), m_ProfilingService(other.m_ProfilingService) {} TimelineUtilityMethods(const TimelineUtilityMethods& other) = delete; @@ -89,6 +92,7 @@ public: private: std::unique_ptr<ISendTimelinePacket> m_SendTimelinePacket; + profiling::ProfilingService& m_ProfilingService; }; } // namespace profiling |