aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/Runtime.cpp
diff options
context:
space:
mode:
authorJim Flynn <jim.flynn@arm.com>2022-03-25 21:24:56 +0000
committerJim Flynn <jim.flynn@arm.com>2022-04-11 14:24:34 +0100
commit870b96c643388ae88dd4245b9169f526d6a8d49e (patch)
tree44a675f1eecdbf0eff40dc4ee623e0a2f03b2f96 /src/armnn/Runtime.cpp
parentb99799bda8fe0fb0a755eebbe2d02dbb74507c9f (diff)
downloadarmnn-870b96c643388ae88dd4245b9169f526d6a8d49e.tar.gz
IVGCVSW-6707 Enables a bare metal compile
Change-Id: Icc2f83c5f27f413758fee3e5c1445e9fc44f42c8 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
Diffstat (limited to 'src/armnn/Runtime.cpp')
-rw-r--r--src/armnn/Runtime.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/armnn/Runtime.cpp b/src/armnn/Runtime.cpp
index 657c90735c..75b1ee8179 100644
--- a/src/armnn/Runtime.cpp
+++ b/src/armnn/Runtime.cpp
@@ -205,7 +205,9 @@ Status RuntimeImpl::LoadNetwork(NetworkId& networkIdOut,
}
{
+#if !defined(ARMNN_DISABLE_THREADS)
std::lock_guard<std::mutex> lockGuard(m_Mutex);
+#endif
// Stores the network
m_LoadedNetworks[networkIdOut] = std::move(loadedNetwork);
@@ -242,7 +244,9 @@ Status RuntimeImpl::UnloadNetwork(NetworkId networkId)
std::unique_ptr<arm::pipe::TimelineUtilityMethods> timelineUtils =
arm::pipe::TimelineUtilityMethods::GetTimelineUtils(*m_ProfilingService.get());
{
+#if !defined(ARMNN_DISABLE_THREADS)
std::lock_guard<std::mutex> lockGuard(m_Mutex);
+#endif
// If timeline recording is on mark the Network end of life
if (timelineUtils)
@@ -586,7 +590,9 @@ RuntimeImpl::~RuntimeImpl()
LoadedNetwork* RuntimeImpl::GetLoadedNetworkPtr(NetworkId networkId) const
{
+#if !defined(ARMNN_DISABLE_THREADS)
std::lock_guard<std::mutex> lockGuard(m_Mutex);
+#endif
return m_LoadedNetworks.at(networkId).get();
}