diff options
author | Jim Flynn <jim.flynn@arm.com> | 2022-03-25 21:24:56 +0000 |
---|---|---|
committer | Jim Flynn <jim.flynn@arm.com> | 2022-04-11 14:24:34 +0100 |
commit | 870b96c643388ae88dd4245b9169f526d6a8d49e (patch) | |
tree | 44a675f1eecdbf0eff40dc4ee623e0a2f03b2f96 /include | |
parent | b99799bda8fe0fb0a755eebbe2d02dbb74507c9f (diff) | |
download | armnn-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')
-rw-r--r-- | include/armnn/Threadpool.hpp | 3 | ||||
-rw-r--r-- | include/armnn/backends/Workload.hpp | 5 | ||||
-rw-r--r-- | include/armnnUtils/Filesystem.hpp | 7 |
3 files changed, 12 insertions, 3 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 diff --git a/include/armnnUtils/Filesystem.hpp b/include/armnnUtils/Filesystem.hpp index ba0d97a272..0d29a7558d 100644 --- a/include/armnnUtils/Filesystem.hpp +++ b/include/armnnUtils/Filesystem.hpp @@ -4,6 +4,7 @@ // #pragma once +#if !defined(ARMNN_DISABLE_FILESYSTEM) #if defined(_MSC_VER) // ghc includes Windows.h directly, bringing in macros that we don't want (e.g. min/max). @@ -21,5 +22,7 @@ namespace Filesystem /// Returns a path to a file in the system temporary folder. If the file existed it will be deleted. fs::path NamedTempFile(const char* fileName); -} -} +} // namespace armnnUtils +} // namespace Filesystem + +#endif // !defined(ARMNN_DISABLE_FILESYSTEM) |