ArmNN
 20.05
TimelineModel.cpp
Go to the documentation of this file.
1 //
2 // Copyright © 2020 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #include "TimelineModel.hpp"
7 
8 namespace armnn
9 {
10 
11 namespace profiling
12 {
13 
15 {
16  m_LabelMap.emplace(label.m_Guid, label);
17 }
18 
19 void TimelineModel::AddEntity(uint64_t guid)
20 {
21  m_Entities.emplace(guid, guid);
22 }
23 
25 {
26  auto iter = m_Entities.find(id);
27  if (iter != m_Entities.end())
28  {
29  return &(iter->second);
30  }
31  else
32  {
33  return nullptr;
34  }
35 }
36 
38 {
39  m_Relationships.emplace(relationship.m_Guid, relationship);
40 }
41 
43 {
44  auto iter = m_Relationships.find(id);
45  if (iter != m_Relationships.end())
46  {
47  return &(iter->second);
48  }
49  else
50  {
51  return nullptr;
52  }
53 }
54 
55 } // namespace profiling
56 
57 } // namespace armnn
ModelRelationship * findRelationship(uint64_t id)
Entity * findEntity(uint64_t id)
Copyright (c) 2020 ARM Limited.
void AddRelationship(const ITimelineDecoder::Relationship &relationship)
void AddLabel(const ITimelineDecoder::Label &label)