From 6940dd720ebb6b3d1df8ca203ab696daefe58189 Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Fri, 20 Mar 2020 12:25:56 +0000 Subject: renamed Documentation folder 20.02 and added .nojekyll file Signed-off-by: Jim Flynn --- ..._1profiling_1_1_register_backend_counters.xhtml | 464 +++++++++++++++++++++ 1 file changed, 464 insertions(+) create mode 100644 20.02/classarmnn_1_1profiling_1_1_register_backend_counters.xhtml (limited to '20.02/classarmnn_1_1profiling_1_1_register_backend_counters.xhtml') diff --git a/20.02/classarmnn_1_1profiling_1_1_register_backend_counters.xhtml b/20.02/classarmnn_1_1profiling_1_1_register_backend_counters.xhtml new file mode 100644 index 0000000000..b013c58e89 --- /dev/null +++ b/20.02/classarmnn_1_1profiling_1_1_register_backend_counters.xhtml @@ -0,0 +1,464 @@ + + + + + + + + + + + + + +ArmNN: RegisterBackendCounters Class Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
RegisterBackendCounters Class Reference
+
+
+ +

#include <RegisterBackendCounters.hpp>

+
+Inheritance diagram for RegisterBackendCounters:
+
+
+ + +IRegisterBackendCounters + +
+ + + + + + + + + + + + + + + + + +

+Public Member Functions

 RegisterBackendCounters (uint16_t currentMaxGlobalCounterID, const BackendId &backendId)
 
 ~RegisterBackendCounters ()=default
 
void RegisterCategory (const std::string &categoryName) override
 
uint16_t RegisterDevice (const std::string &deviceName, uint16_t cores=0, const Optional< std::string > &parentCategoryName=EmptyOptional()) override
 
uint16_t RegisterCounterSet (const std::string &counterSetName, uint16_t count=0, const Optional< std::string > &parentCategoryName=EmptyOptional()) override
 
uint16_t RegisterCounter (const uint16_t uid, const std::string &parentCategoryName, uint16_t counterClass, uint16_t interpolation, double multiplier, const std::string &name, const std::string &description, const Optional< std::string > &units=EmptyOptional(), const Optional< uint16_t > &numberOfCores=EmptyOptional(), const Optional< uint16_t > &deviceUid=EmptyOptional(), const Optional< uint16_t > &counterSetUid=EmptyOptional()) override
 
- Public Member Functions inherited from IRegisterBackendCounters
virtual ~IRegisterBackendCounters ()
 
+

Detailed Description

+
+

Definition at line 19 of file RegisterBackendCounters.hpp.

+

Constructor & Destructor Documentation

+ +

◆ RegisterBackendCounters()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
RegisterBackendCounters (uint16_t currentMaxGlobalCounterID,
const BackendIdbackendId 
)
+
+inline
+
+ +

Definition at line 23 of file RegisterBackendCounters.hpp.

+ +

References RegisterBackendCounters::RegisterCategory(), RegisterBackendCounters::RegisterCounter(), RegisterBackendCounters::RegisterCounterSet(), RegisterBackendCounters::RegisterDevice(), and RegisterBackendCounters::~RegisterBackendCounters().

+
24  : m_CurrentMaxGlobalCounterID(currentMaxGlobalCounterID),
25  m_CounterDirectory(ProfilingService::Instance().GetCounterRegistry()),
26  m_BackendId(backendId) {}
static ProfilingService & Instance()
+
+
+
+ +

◆ ~RegisterBackendCounters()

+ +
+
+ + + + + +
+ + + + + + + +
~RegisterBackendCounters ()
+
+default
+
+
+

Member Function Documentation

+ +

◆ RegisterCategory()

+ +
+
+ + + + + +
+ + + + + + + + +
void RegisterCategory (const std::string & categoryName)
+
+overridevirtual
+
+ +

Implements IRegisterBackendCounters.

+ +

Definition at line 14 of file RegisterBackendCounters.cpp.

+ +

References ICounterRegistry::RegisterCategory().

+ +

Referenced by BOOST_AUTO_TEST_CASE(), and RegisterBackendCounters::RegisterBackendCounters().

+
15 {
16  m_CounterDirectory.RegisterCategory(categoryName);
17 }
virtual const Category * RegisterCategory(const std::string &categoryName)=0
+
+
+
+ +

◆ RegisterCounter()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
uint16_t RegisterCounter (const uint16_t uid,
const std::string & parentCategoryName,
uint16_t counterClass,
uint16_t interpolation,
double multiplier,
const std::string & name,
const std::string & description,
const Optional< std::string > & units = EmptyOptional(),
const Optional< uint16_t > & numberOfCores = EmptyOptional(),
const Optional< uint16_t > & deviceUid = EmptyOptional(),
const Optional< uint16_t > & counterSetUid = EmptyOptional() 
)
+
+overridevirtual
+
+ +

Implements IRegisterBackendCounters.

+ +

Definition at line 35 of file RegisterBackendCounters.cpp.

+ +

References ProfilingService::GetCounterMappingRegistry(), ProfilingService::Instance(), Counter::m_MaxCounterUid, Counter::m_Uid, ICounterRegistry::RegisterCounter(), and IRegisterCounterMapping::RegisterMapping().

+ +

Referenced by BOOST_AUTO_TEST_CASE(), and RegisterBackendCounters::RegisterBackendCounters().

+
46 {
47  ++m_CurrentMaxGlobalCounterID;
48  const Counter* counterPtr = m_CounterDirectory.RegisterCounter(m_BackendId,
49  m_CurrentMaxGlobalCounterID,
50  parentCategoryName,
51  counterClass,
52  interpolation,
53  multiplier,
54  name,
55  description,
56  units,
57  numberOfCores,
58  deviceUid,
59  counterSetUid);
60  m_CurrentMaxGlobalCounterID = counterPtr->m_MaxCounterUid;
61  // register mappings
62  IRegisterCounterMapping& counterIdMap = ProfilingService::Instance().GetCounterMappingRegistry();
63  uint16_t globalCounterId = counterPtr->m_Uid;
64  if (globalCounterId == counterPtr->m_MaxCounterUid)
65  {
66  counterIdMap.RegisterMapping(globalCounterId, uid, m_BackendId);
67  }
68  else
69  {
70  uint16_t backendCounterId = uid;
71  while (globalCounterId <= counterPtr->m_MaxCounterUid)
72  {
73  // register mapping
74  // globalCounterId -> backendCounterId, m_BackendId
75  counterIdMap.RegisterMapping(globalCounterId, backendCounterId, m_BackendId);
76  ++globalCounterId;
77  ++backendCounterId;
78  }
79  }
80  return m_CurrentMaxGlobalCounterID;
81 }
static ProfilingService & Instance()
+
virtual void RegisterMapping(uint16_t globalCounterId, uint16_t backendCounterId, const armnn::BackendId &backendId)=0
+
virtual const Counter * RegisterCounter(const BackendId &backendId, const uint16_t uid, const std::string &parentCategoryName, uint16_t counterClass, uint16_t interpolation, double multiplier, const std::string &name, const std::string &description, const Optional< std::string > &units, const Optional< uint16_t > &numberOfCores, const Optional< uint16_t > &deviceUid, const Optional< uint16_t > &counterSetUid)=0
+
IRegisterCounterMapping & GetCounterMappingRegistry()
+
+
+
+ +

◆ RegisterCounterSet()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
uint16_t RegisterCounterSet (const std::string & counterSetName,
uint16_t count = 0,
const Optional< std::string > & parentCategoryName = EmptyOptional() 
)
+
+overridevirtual
+
+ +

Implements IRegisterBackendCounters.

+ +

Definition at line 27 of file RegisterBackendCounters.cpp.

+ +

References CounterSet::m_Uid, and ICounterRegistry::RegisterCounterSet().

+ +

Referenced by BOOST_AUTO_TEST_CASE(), and RegisterBackendCounters::RegisterBackendCounters().

+
30 {
31  const CounterSet* counterSetPtr = m_CounterDirectory.RegisterCounterSet(counterSetName, count, parentCategoryName);
32  return counterSetPtr->m_Uid;
33 }
+
virtual const CounterSet * RegisterCounterSet(const std::string &counterSetName, uint16_t count, const Optional< std::string > &parentCategoryName)=0
+
+
+
+ +

◆ RegisterDevice()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
uint16_t RegisterDevice (const std::string & deviceName,
uint16_t cores = 0,
const Optional< std::string > & parentCategoryName = EmptyOptional() 
)
+
+overridevirtual
+
+ +

Implements IRegisterBackendCounters.

+ +

Definition at line 19 of file RegisterBackendCounters.cpp.

+ +

References Device::m_Uid, and ICounterRegistry::RegisterDevice().

+ +

Referenced by BOOST_AUTO_TEST_CASE(), and RegisterBackendCounters::RegisterBackendCounters().

+
22 {
23  const Device* devicePtr = m_CounterDirectory.RegisterDevice(deviceName, cores, parentCategoryName);
24  return devicePtr->m_Uid;
25 }
virtual const Device * RegisterDevice(const std::string &deviceName, uint16_t cores, const Optional< std::string > &parentCategoryName)=0
+ +
+
+
+
The documentation for this class was generated from the following files: +
+
+ + + + -- cgit v1.2.1