aboutsummaryrefslogtreecommitdiff
path: root/include/armnn
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 /include/armnn
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 'include/armnn')
-rw-r--r--include/armnn/Threadpool.hpp3
-rw-r--r--include/armnn/backends/Workload.hpp5
2 files changed, 7 insertions, 1 deletions
diff --git a/include/armnn/Threadpool.hpp b/include/armnn/Threadpool.hpp
index e2458dbb65..672f8b8de6 100644
--- a/include/armnn/Threadpool.hpp
+++ b/include/armnn/Threadpool.hpp
@@ -2,6 +2,7 @@
// Copyright © 2021 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
+#if !defined(ARMNN_DISABLE_THREADS)
#pragma once
@@ -76,3 +77,5 @@ private:
} // namespace experimental
} // namespace armnn
+
+#endif
diff --git a/include/armnn/backends/Workload.hpp b/include/armnn/backends/Workload.hpp
index d426486f89..6c9fcabd55 100644
--- a/include/armnn/backends/Workload.hpp
+++ b/include/armnn/backends/Workload.hpp
@@ -43,8 +43,9 @@ public:
void ExecuteAsync(WorkingMemDescriptor& workingMemDescriptor) override
{
ARMNN_LOG(info) << "Using default async workload execution, this will network affect performance";
+#if !defined(ARMNN_DISABLE_THREADS)
std::lock_guard<std::mutex> lockGuard(m_AsyncWorkloadMutex);
-
+#endif
m_Data.m_Inputs = workingMemDescriptor.m_Inputs;
m_Data.m_Outputs = workingMemDescriptor.m_Outputs;
@@ -81,7 +82,9 @@ protected:
const arm::pipe::ProfilingGuid m_Guid;
private:
+#if !defined(ARMNN_DISABLE_THREADS)
std::mutex m_AsyncWorkloadMutex;
+#endif
};
// TypedWorkload used