diff options
author | Jim Flynn <jim.flynn@arm.com> | 2022-04-12 17:19:28 +0100 |
---|---|---|
committer | TeresaARM <teresa.charlinreyes@arm.com> | 2022-04-14 14:06:56 +0000 |
commit | e195a0418d86650e132737716059bff0ec80257f (patch) | |
tree | 1678283a958a2ab74cd27b648f5a69ef5270d289 /profiling/client/src/PeriodicCounterCapture.cpp | |
parent | 69515d3b36653a00a5abee8bf52ac26dd6522bee (diff) | |
download | armnn-e195a0418d86650e132737716059bff0ec80257f.tar.gz |
IVGCVSW-6710 Add compile of BareMetalDeserializedGraph sample
Change-Id: Ice69c2a22f589f68d302f80500dfe4e514a796d2
Signed-off-by: Jim Flynn <jim.flynn@arm.com>
Diffstat (limited to 'profiling/client/src/PeriodicCounterCapture.cpp')
-rw-r--r-- | profiling/client/src/PeriodicCounterCapture.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/profiling/client/src/PeriodicCounterCapture.cpp b/profiling/client/src/PeriodicCounterCapture.cpp index 490173c7e0..25d1a1789a 100644 --- a/profiling/client/src/PeriodicCounterCapture.cpp +++ b/profiling/client/src/PeriodicCounterCapture.cpp @@ -31,7 +31,9 @@ void PeriodicCounterCapture::Start() m_KeepRunning.store(true); // Start the new capture thread. +#if !defined(ARMNN_DISABLE_THREADS) m_PeriodCaptureThread = std::thread(&PeriodicCounterCapture::Capture, this, std::ref(m_ReadCounterValues)); +#endif } void PeriodicCounterCapture::Stop() @@ -39,12 +41,14 @@ void PeriodicCounterCapture::Stop() // Signal the capture thread to stop m_KeepRunning.store(false); +#if !defined(ARMNN_DISABLE_THREADS) // Check that the capture thread is running if (m_PeriodCaptureThread.joinable()) { // Wait for the capture thread to complete operations m_PeriodCaptureThread.join(); } +#endif // Mark the capture thread as not running m_IsRunning = false; @@ -85,7 +89,9 @@ void PeriodicCounterCapture::Capture(IReadCounterValues& readCounterValues) if (capturePeriod == 0) { // No data capture, wait the indicated capture period (milliseconds), if it is not zero +#if !defined(ARMNN_DISABLE_THREADS) std::this_thread::sleep_for(std::chrono::milliseconds(50u)); +#endif continue; } @@ -129,7 +135,9 @@ void PeriodicCounterCapture::Capture(IReadCounterValues& readCounterValues) }); // Wait the indicated capture period (microseconds) +#if !defined(ARMNN_DISABLE_THREADS) std::this_thread::sleep_for(std::chrono::microseconds(capturePeriod)); +#endif } while (m_KeepRunning.load()); } |