10 #include <boost/format.hpp> 22 if (!m_ReportStructure.has_value())
24 throw armnn::Exception(std::string(
"Profiling Service constructor must be initialised with an " 25 "IReportStructure argument in order to run timeline reporting"));
28 switch ( currentState )
34 boost::format(
"Activate Timeline Reporting Command Handler invoked while in a wrong state: %1%")
37 if ( !( packet.GetPacketFamily() == 0u && packet.GetPacketId() == 6u ))
39 throw armnn::Exception(std::string(
"Expected Packet family = 0, id = 6 but received family =")
40 + std::to_string(packet.GetPacketFamily())
41 +
" id = " + std::to_string(packet.GetPacketId()));
48 m_TimelineReporting =
true;
50 m_ReportStructure.value().ReportStructure();
56 throw RuntimeException(boost::str(boost::format(
"Unknown profiling service state: %1%")
57 % static_cast<int>(currentState)));
ProfilingState GetCurrentState() const
virtual void NotifyBackendsForTimelineReporting()=0
void SendTimelineMessageDirectoryPackage() override
Create and write a TimelineMessageDirectoryPackage in the buffer.
Copyright (c) 2020 ARM Limited.
void operator()(const Packet &packet) override
Base class for all ArmNN exceptions so that users can filter to just those.
static void SendWellKnownLabelsAndEventClasses(ISendTimelinePacket &timelinePacket)
constexpr char const * GetProfilingStateName(ProfilingState state)