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

Method InitializeCounterValue

profiling/client/src/ProfilingService.cpp:351–369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

349}
350
351void ProfilingService::InitializeCounterValue(uint16_t counterUid)
352{
353#if !defined(ARMNN_STUB_PROFILING)
354 // Increase the size of the counter index if necessary
355 if (counterUid >= m_CounterIndex.size())
356 {
357 m_CounterIndex.resize(arm::pipe::numeric_cast<size_t>(counterUid) + 1);
358 }
359
360 // Create a new atomic counter and add it to the list
361 m_CounterValues.emplace_back(0);
362
363 // Register the new counter to the counter index for quick access
364 std::atomic<uint32_t>* counterValuePtr = &(m_CounterValues.back());
365 m_CounterIndex.at(counterUid) = counterValuePtr;
366#else
367 IgnoreUnused(counterUid);
368#endif // ARMNN_STUB_PROFILING
369}
370
371void ProfilingService::Reset()
372{

Callers 1

Calls 3

resizeMethod · 0.80
IgnoreUnusedFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected