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

Method GetActiveCounters

profiling/client/src/backends/BackendProfiling.cpp:67–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67std::vector<CounterStatus> BackendProfiling::GetActiveCounters()
68{
69 CaptureData captureData = m_ProfilingService.GetCaptureData();
70
71 const std::vector<uint16_t>& globalCounterIds = captureData.GetCounterIds();
72 std::vector<CounterStatus> activeCounterIds;
73
74 for (auto globalCounterId : globalCounterIds) {
75 // Get pair of local counterId and backendId using globalCounterId
76 const std::pair<uint16_t, std::string>& backendCounterIdPair =
77 m_ProfilingService.GetCounterMappings().GetBackendId(globalCounterId);
78 if (backendCounterIdPair.second == m_BackendId)
79 {
80 activeCounterIds.emplace_back(backendCounterIdPair.first,
81 globalCounterId,
82 true,
83 captureData.GetCapturePeriod());
84 }
85 }
86
87 return activeCounterIds;
88}
89
90bool BackendProfiling::IsProfilingEnabled() const
91{

Callers 1

ProfilingTests.cppFile · 0.80

Calls 3

GetCapturePeriodMethod · 0.80
GetCaptureDataMethod · 0.45
GetBackendIdMethod · 0.45

Tested by

no test coverage detected