MCPcopy Create free account
hub / github.com/ARM-software/armnn / GetJSONEntityString

Method GetJSONEntityString

src/timelineDecoder/JSONTimelineDecoder.cpp:244–272  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

242}
243
244std::string JSONTimelineDecoder::GetJSONEntityString(JSONTimelineDecoder::JSONEntity& entity, int& counter)
245{
246 std::string jsonEntityString;
247 if(entity.GetType() == LAYER)
248 {
249 return GetLayerJSONString(entity, counter, jsonEntityString);
250 }
251 else if (entity.GetType() == WORKLOAD)
252 {
253 return GetWorkloadJSONString(entity, counter, jsonEntityString);
254 }
255 else if (entity.GetType() == WORKLOAD_EXECUTION)
256 {
257 return GetWorkloadExecutionJSONString(entity, jsonEntityString);
258 }
259 else if (entity.GetType() == INFERENCE)
260 {
261 return jsonEntityString;
262 }
263 else
264 {
265 for (uint64_t child_entity_id : entity.childEntities)
266 {
267 JSONEntity& childEntity = this->m_Model.jsonEntities.at(child_entity_id);
268 jsonEntityString.append(GetJSONEntityString(childEntity, ++counter));
269 }
270 return jsonEntityString;
271 }
272}
273
274std::string JSONTimelineDecoder::GetWorkloadExecutionJSONString(const JSONTimelineDecoder::JSONEntity& entity,
275 std::string& jsonEntityString) const

Callers

nothing calls this directly

Calls 2

appendMethod · 0.80
GetTypeMethod · 0.45

Tested by

no test coverage detected