| 349 | } |
| 350 | |
| 351 | void 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 | |
| 371 | void ProfilingService::Reset() |
| 372 | { |
no test coverage detected