ArmNN
 21.02
TimelineMessageDecoder Class Reference

#include <TestTimelinePacketHandler.hpp>

Inheritance diagram for TimelineMessageDecoder:

Public Member Functions

 TimelineMessageDecoder (TimelineModel &model)
 
virtual TimelineStatus CreateEntity (const Entity &) override
 
virtual TimelineStatus CreateEventClass (const EventClass &) override
 
virtual TimelineStatus CreateEvent (const Event &) override
 
virtual TimelineStatus CreateLabel (const Label &) override
 
virtual TimelineStatus CreateRelationship (const Relationship &) override
 
void SetPacketHandler (TestTimelinePacketHandler *packetHandler)
 

Detailed Description

Definition at line 31 of file TestTimelinePacketHandler.hpp.

Constructor & Destructor Documentation

◆ TimelineMessageDecoder()

Member Function Documentation

◆ CreateEntity()

arm::pipe::ITimelineDecoder::TimelineStatus CreateEntity ( const Entity entity)
overridevirtual

Definition at line 90 of file TestTimelinePacketHandler.cpp.

References TimelineModel::AddEntity().

Referenced by TimelineMessageDecoder::TimelineMessageDecoder().

91 {
92  m_TimelineModel.AddEntity(entity.m_Guid);
93  return arm::pipe::ITimelineDecoder::TimelineStatus::TimelineStatus_Success;
94 }

◆ CreateEvent()

arm::pipe::ITimelineDecoder::TimelineStatus CreateEvent ( const Event )
overridevirtual

Definition at line 103 of file TestTimelinePacketHandler.cpp.

References TimelineModel::AddEvent().

Referenced by TimelineMessageDecoder::TimelineMessageDecoder().

105 {
106  m_TimelineModel.AddEvent(event);
107  return arm::pipe::ITimelineDecoder::TimelineStatus::TimelineStatus_Success;
108 }
void AddEvent(const arm::pipe::ITimelineDecoder::Event &event)

◆ CreateEventClass()

arm::pipe::ITimelineDecoder::TimelineStatus CreateEventClass ( const EventClass &  )
overridevirtual

Definition at line 96 of file TestTimelinePacketHandler.cpp.

References TimelineModel::AddEventClass().

Referenced by TimelineMessageDecoder::TimelineMessageDecoder().

98 {
99  m_TimelineModel.AddEventClass(eventClass);
100  return arm::pipe::ITimelineDecoder::TimelineStatus::TimelineStatus_Success;
101 }
void AddEventClass(const arm::pipe::ITimelineDecoder::EventClass &eventClass)

◆ CreateLabel()

arm::pipe::ITimelineDecoder::TimelineStatus CreateLabel ( const Label &  )
overridevirtual

Definition at line 110 of file TestTimelinePacketHandler.cpp.

References TimelineModel::AddLabel().

Referenced by TimelineMessageDecoder::TimelineMessageDecoder().

112 {
113  m_TimelineModel.AddLabel(label);
114  return arm::pipe::ITimelineDecoder::TimelineStatus::TimelineStatus_Success;
115 }
void AddLabel(const arm::pipe::ITimelineDecoder::Label &label)

◆ CreateRelationship()

arm::pipe::ITimelineDecoder::TimelineStatus CreateRelationship ( const Relationship &  )
overridevirtual

Definition at line 117 of file TestTimelinePacketHandler.cpp.

References TimelineModel::AddRelationship(), LabelsAndEventClasses::ARMNN_PROFILING_EOL_EVENT_CLASS, armnn::profiling::ExecutionLink, and TimelineModel::IsInferenceGuid().

Referenced by TimelineMessageDecoder::TimelineMessageDecoder().

119 {
120  m_TimelineModel.AddRelationship(relationship);
121  // check to see if this is an execution link to an inference of event class end of life
122  // if so the inference has completed so send out a notification...
123  if (relationship.m_RelationshipType == RelationshipType::ExecutionLink &&
124  m_TimelineModel.IsInferenceGuid(relationship.m_HeadGuid))
125  {
126  ProfilingStaticGuid attributeGuid(relationship.m_AttributeGuid);
128  {
129  if (m_PacketHandler != nullptr)
130  {
131  m_PacketHandler->SetInferenceComplete();
132  }
133  }
134  }
135  return arm::pipe::ITimelineDecoder::TimelineStatus::TimelineStatus_Success;
136 }
bool IsInferenceGuid(uint64_t guid) const
static ARMNN_DLLEXPORT ProfilingStaticGuid ARMNN_PROFILING_EOL_EVENT_CLASS
void AddRelationship(const arm::pipe::ITimelineDecoder::Relationship &relationship)

◆ SetPacketHandler()

void SetPacketHandler ( TestTimelinePacketHandler packetHandler)
inline

Definition at line 40 of file TestTimelinePacketHandler.hpp.

40 {m_PacketHandler = packetHandler;};

The documentation for this class was generated from the following files: