aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRob Hughes <robert.hughes@arm.com>2021-07-14 09:48:54 +0100
committerRob Hughes <robert.hughes@arm.com>2021-07-21 14:09:51 +0000
commit9542f90d82a42096166d72109683abc165072297 (patch)
tree1f519b437ef83eed67419f52e1326f6d909e2467 /include
parent9021125ff83a035dae05e5c7c0e6b1455b71af1a (diff)
downloadarmnn-9542f90d82a42096166d72109683abc165072297.tar.gz
NNXSW-3081 Move Filesystem.hpp and Threads.hpp to public include
!android-nn-driver:5966 Change-Id: Ice0b4d2872bb0e09bfc0763034a206c3a8f24af4 Signed-off-by: Rob Hughes <robert.hughes@arm.com>
Diffstat (limited to 'include')
-rw-r--r--include/armnnUtils/Filesystem.hpp25
-rw-r--r--include/armnnUtils/Threads.hpp16
2 files changed, 41 insertions, 0 deletions
diff --git a/include/armnnUtils/Filesystem.hpp b/include/armnnUtils/Filesystem.hpp
new file mode 100644
index 0000000000..ba0d97a272
--- /dev/null
+++ b/include/armnnUtils/Filesystem.hpp
@@ -0,0 +1,25 @@
+//
+// Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+
+#pragma once
+
+#if defined(_MSC_VER)
+// ghc includes Windows.h directly, bringing in macros that we don't want (e.g. min/max).
+// By including Windows.h ourselves first (with appropriate options), we prevent this.
+#include <common/include/WindowsWrapper.hpp>
+#endif
+#include <ghc/filesystem.hpp>
+namespace fs = ghc::filesystem;
+
+namespace armnnUtils
+{
+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);
+
+}
+}
diff --git a/include/armnnUtils/Threads.hpp b/include/armnnUtils/Threads.hpp
new file mode 100644
index 0000000000..4cecfd5079
--- /dev/null
+++ b/include/armnnUtils/Threads.hpp
@@ -0,0 +1,16 @@
+//
+// Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+
+#pragma once
+
+namespace armnnUtils
+{
+namespace Threads
+{
+
+int GetCurrentThreadId();
+
+}
+}