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

Method AddBackendProfilingContext

profiling/client/src/ProfilingService.cpp:218–231  ·  view source on GitHub ↗

Store a profiling context returned from a backend that support profiling, and register its counters

Source from the content-addressed store, hash-verified

216
217// Store a profiling context returned from a backend that support profiling, and register its counters
218void ProfilingService::AddBackendProfilingContext(
219 const std::string& backendId,
220 std::shared_ptr<IBackendProfilingContext> profilingContext)
221{
222#if !defined(ARMNN_STUB_PROFILING)
223 ARM_PIPE_ASSERT(profilingContext != nullptr);
224 // Register the backend counters
225 m_MaxGlobalCounterId = profilingContext->RegisterCounters(m_MaxGlobalCounterId);
226 m_BackendProfilingContexts.emplace(backendId, std::move(profilingContext));
227#else
228 IgnoreUnused(backendId);
229 IgnoreUnused(profilingContext);
230#endif // ARMNN_STUB_PROFILING
231}
232const ICounterDirectory& ProfilingService::GetCounterDirectory() const
233{
234 return m_CounterDirectory;

Callers 1

RuntimeImplMethod · 0.80

Calls 3

RegisterCountersMethod · 0.80
emplaceMethod · 0.80
IgnoreUnusedFunction · 0.50

Tested by

no test coverage detected