aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/armnn/Threadpool.hpp3
-rw-r--r--include/armnn/backends/Workload.hpp5
-rw-r--r--include/armnnUtils/Filesystem.hpp7
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)