ArmNN
 21.08
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 91 of file TestTimelinePacketHandler.cpp.

References TimelineModel::AddEntity().

Referenced by TimelineMessageDecoder::TimelineMessageDecoder().

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

◆ CreateEvent()

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

Definition at line 104 of file TestTimelinePacketHandler.cpp.

References TimelineModel::AddEvent().

Referenced by TimelineMessageDecoder::TimelineMessageDecoder().

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

◆ CreateEventClass()

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

Definition at line 97 of file TestTimelinePacketHandler.cpp.

References TimelineModel::AddEventClass().

Referenced by TimelineMessageDecoder::TimelineMessageDecoder().

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

◆ CreateLabel()

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

Definition at line 111 of file TestTimelinePacketHandler.cpp.

References TimelineModel::AddLabel().

Referenced by TimelineMessageDecoder::TimelineMessageDecoder().

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

◆ CreateRelationship()

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

Definition at line 118 of file TestTimelinePacketHandler.cpp.

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

Referenced by TimelineMessageDecoder::TimelineMessageDecoder().

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