ArmNN  NotReleased
CategoryRecord Struct Reference

#include <CounterDirectory.hpp>

Public Member Functions

void print () const
 

Public Attributes

uint16_t m_DeviceUid
 
uint16_t m_CounterSet
 
uint16_t m_EventCount
 
std::string m_CategoryName
 
std::vector< EventRecordm_EventRecords
 

Detailed Description

Definition at line 107 of file CounterDirectory.hpp.

Member Function Documentation

◆ print()

void print ( ) const
inline

Definition at line 115 of file CounterDirectory.hpp.

References armnn::profiling::CentreAlignFormatting(), EventRecord::printContents(), and EventRecord::printHeader().

Referenced by CounterDirectory::print().

116  {
117  std::string body;
118  std::string header;
119 
120  header.append(gatordmock::CentreAlignFormatting("Name", 20));
121  header.append(" | ");
122  header.append(gatordmock::CentreAlignFormatting("Device", 12));
123  header.append(" | ");
124  header.append(gatordmock::CentreAlignFormatting("Counter set UID:", 16));
125  header.append(" | ");
126  header.append(gatordmock::CentreAlignFormatting("Event Count", 14));
127  header.append("\n");
128 
130  body.append(" | ");
131  body.append(gatordmock::CentreAlignFormatting(std::to_string(m_DeviceUid), 12));
132  body.append(" | ");
133  body.append(gatordmock::CentreAlignFormatting(std::to_string(m_CounterSet), 16));
134  body.append(" | ");
135  body.append(gatordmock::CentreAlignFormatting(std::to_string(m_EventCount), 14));
136 
137  std::cout << "\n" << "\n";
138  std::cout << gatordmock::CentreAlignFormatting("CATEGORY", static_cast<int>(header.size()));
139  std::cout << "\n";
140  std::cout << std::string(header.size(), '=') << "\n";
141 
142  std::cout<< header;
143 
144  std::cout << std::string(body.size(), '-') << "\n";
145 
146  std::cout<< body;
147 
148  if(m_EventRecords.size() > 0)
149  {
151 
152  std::for_each(m_EventRecords.begin(), m_EventRecords.end(), std::mem_fun_ref(&EventRecord::printContents));
153  }
154  }
std::string CentreAlignFormatting(const std::string &stringToPass, const int spacingWidth)
std::vector< EventRecord > m_EventRecords
static void printHeader(std::string categoryName)

Member Data Documentation

◆ m_CategoryName

std::string m_CategoryName

Definition at line 112 of file CounterDirectory.hpp.

◆ m_CounterSet

uint16_t m_CounterSet

Definition at line 110 of file CounterDirectory.hpp.

◆ m_DeviceUid

uint16_t m_DeviceUid

Definition at line 109 of file CounterDirectory.hpp.

◆ m_EventCount

uint16_t m_EventCount

Definition at line 111 of file CounterDirectory.hpp.

◆ m_EventRecords

std::vector<EventRecord> m_EventRecords

Definition at line 113 of file CounterDirectory.hpp.


The documentation for this struct was generated from the following file: