ArmNN
 24.08
JsonChildObject Struct Reference

#include <JsonPrinter.hpp>

Collaboration diagram for JsonChildObject:
[legend]

Public Member Functions

 JsonChildObject (const std::string &label)
 
 JsonChildObject (const JsonChildObject &)=default
 
void AddMeasurement (const double measurement)
 
void SetAndParseDetails (std::string layerDetailsStr)
 
void SetGuid (arm::pipe::ProfilingGuid guid)
 
void AddChild (const JsonChildObject &childObject)
 
JsonChildObjectGetChild (const unsigned int index)
 
void SetUnit (const Measurement::Unit unit)
 
size_t NumChildren () const
 
void SetType (JsonObjectType type)
 
JsonObjectType GetType () const
 
void EnableDetailsOnly ()
 
bool IsDetailsOnlyEnabled () const
 
 ~JsonChildObject ()=default
 

Public Attributes

std::string m_Label
 
Measurement::Unit m_Unit
 
JsonObjectType m_Type
 
Optional< arm::pipe::ProfilingGuid > m_Guid
 
std::vector< double > m_Measurements
 
std::vector< std::string > m_LayerDetailsList
 
std::vector< JsonChildObjectm_Children
 

Detailed Description

Definition at line 27 of file JsonPrinter.hpp.

Constructor & Destructor Documentation

◆ JsonChildObject() [1/2]

JsonChildObject ( const std::string &  label)
inline

Definition at line 30 of file JsonPrinter.hpp.

31  : m_Label(label),
32  m_Unit(Measurement::Unit::TIME_MS),
35  m_DetailsOnly(false)
36  {}

◆ JsonChildObject() [2/2]

JsonChildObject ( const JsonChildObject )
default

◆ ~JsonChildObject()

~JsonChildObject ( )
default

Member Function Documentation

◆ AddChild()

void AddChild ( const JsonChildObject childObject)
inline

Definition at line 59 of file JsonPrinter.hpp.

60  {
61  m_Children.push_back(childObject);
62  }

References JsonChildObject::m_Children.

Referenced by armnn::ExtractJsonObjects().

◆ AddMeasurement()

void AddMeasurement ( const double  measurement)
inline

Definition at line 39 of file JsonPrinter.hpp.

40  {
41  m_Measurements.push_back(measurement);
42  }

References JsonChildObject::m_Measurements.

Referenced by armnn::ExtractJsonObjects().

◆ EnableDetailsOnly()

void EnableDetailsOnly ( )
inline

Definition at line 89 of file JsonPrinter.hpp.

90  {
91  m_DetailsOnly = true;
92  }

Referenced by ProfilerImpl::Print().

◆ GetChild()

JsonChildObject& GetChild ( const unsigned int  index)
inline

Definition at line 64 of file JsonPrinter.hpp.

65  {
66  return m_Children[index];
67  }

References JsonChildObject::m_Children.

Referenced by armnn::ExtractJsonObjects().

◆ GetType()

JsonObjectType GetType ( ) const
inline

Definition at line 84 of file JsonPrinter.hpp.

85  {
86  return m_Type;
87  }

References JsonChildObject::m_Type.

◆ IsDetailsOnlyEnabled()

bool IsDetailsOnlyEnabled ( ) const
inline

Definition at line 94 of file JsonPrinter.hpp.

95  {
96  return m_DetailsOnly;
97  }

◆ NumChildren()

size_t NumChildren ( ) const
inline

Definition at line 74 of file JsonPrinter.hpp.

75  {
76  return m_Children.size();
77  }

References JsonChildObject::m_Children.

Referenced by armnn::ExtractJsonObjects().

◆ SetAndParseDetails()

void SetAndParseDetails ( std::string  layerDetailsStr)
inline

Definition at line 44 of file JsonPrinter.hpp.

45  {
46  std::stringstream layerDetails(layerDetailsStr);
47  std::string stringLine;
48  while (std::getline(layerDetails, stringLine, '\n'))
49  {
50  m_LayerDetailsList.push_back(stringLine);
51  }
52  }

References JsonChildObject::m_LayerDetailsList.

Referenced by armnn::ConfigureDetailsObject().

◆ SetGuid()

void SetGuid ( arm::pipe::ProfilingGuid  guid)
inline

Definition at line 54 of file JsonPrinter.hpp.

55  {
56  m_Guid = Optional<arm::pipe::ProfilingGuid>(guid);
57  }

References JsonChildObject::m_Guid.

Referenced by armnn::ExtractJsonObjects().

◆ SetType()

void SetType ( JsonObjectType  type)
inline

Definition at line 79 of file JsonPrinter.hpp.

80  {
81  m_Type = type;
82  }

References JsonChildObject::m_Type.

Referenced by armnn::ConfigureDetailsObject(), and armnn::ExtractJsonObjects().

◆ SetUnit()

void SetUnit ( const Measurement::Unit  unit)
inline

Definition at line 69 of file JsonPrinter.hpp.

70  {
71  m_Unit = unit;
72  }

References JsonChildObject::m_Unit.

Referenced by armnn::ExtractJsonObjects().

Member Data Documentation

◆ m_Children

◆ m_Guid

Optional<arm::pipe::ProfilingGuid> m_Guid

Definition at line 104 of file JsonPrinter.hpp.

Referenced by JsonChildObject::SetGuid().

◆ m_Label

std::string m_Label

Definition at line 101 of file JsonPrinter.hpp.

◆ m_LayerDetailsList

std::vector<std::string> m_LayerDetailsList

Definition at line 106 of file JsonPrinter.hpp.

Referenced by JsonChildObject::SetAndParseDetails().

◆ m_Measurements

std::vector<double> m_Measurements

Definition at line 105 of file JsonPrinter.hpp.

Referenced by JsonChildObject::AddMeasurement().

◆ m_Type

Definition at line 103 of file JsonPrinter.hpp.

Referenced by JsonChildObject::GetType(), and JsonChildObject::SetType().

◆ m_Unit

Definition at line 102 of file JsonPrinter.hpp.

Referenced by JsonChildObject::SetUnit().


The documentation for this struct was generated from the following file:
armnn::JsonChildObject::m_Type
JsonObjectType m_Type
Definition: JsonPrinter.hpp:103
armnn::JsonChildObject::m_Unit
Measurement::Unit m_Unit
Definition: JsonPrinter.hpp:102
armnn::EmptyOptional
EmptyOptional is used to initialize the Optional class in case we want to have default value for an O...
Definition: Optional.hpp:32
armnn::JsonChildObject::m_Label
std::string m_Label
Definition: JsonPrinter.hpp:101
armnn::JsonChildObject::m_LayerDetailsList
std::vector< std::string > m_LayerDetailsList
Definition: JsonPrinter.hpp:106
armnn::JsonObjectType::Event
@ Event
armnn::JsonChildObject::m_Children
std::vector< JsonChildObject > m_Children
Definition: JsonPrinter.hpp:107
armnn::JsonChildObject::m_Measurements
std::vector< double > m_Measurements
Definition: JsonPrinter.hpp:105
armnn::JsonChildObject::m_Guid
Optional< arm::pipe::ProfilingGuid > m_Guid
Definition: JsonPrinter.hpp:104