ArmNN
 22.05
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 33 of file TestTimelinePacketHandler.hpp.

Constructor & Destructor Documentation

◆ TimelineMessageDecoder()

Member Function Documentation

◆ CreateEntity()

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

Definition at line 92 of file TestTimelinePacketHandler.cpp.

References TimelineModel::AddEntity().

Referenced by TimelineMessageDecoder::TimelineMessageDecoder().

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

◆ CreateEvent()

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

Definition at line 105 of file TestTimelinePacketHandler.cpp.

References TimelineModel::AddEvent().

Referenced by TimelineMessageDecoder::TimelineMessageDecoder().

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

◆ CreateEventClass()

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

Definition at line 98 of file TestTimelinePacketHandler.cpp.

References TimelineModel::AddEventClass().

Referenced by TimelineMessageDecoder::TimelineMessageDecoder().

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

◆ CreateLabel()

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

Definition at line 112 of file TestTimelinePacketHandler.cpp.

References TimelineModel::AddLabel().

Referenced by TimelineMessageDecoder::TimelineMessageDecoder().

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

◆ CreateRelationship()

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

Definition at line 119 of file TestTimelinePacketHandler.cpp.

References TimelineModel::AddRelationship(), and TimelineModel::IsInferenceGuid().

Referenced by TimelineMessageDecoder::TimelineMessageDecoder().

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

◆ SetPacketHandler()

void SetPacketHandler ( TestTimelinePacketHandler packetHandler)
inline

Definition at line 42 of file TestTimelinePacketHandler.hpp.

42 {m_PacketHandler = packetHandler;};

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