aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColm Donelan <colm.donelan@arm.com>2023-07-03 16:19:44 +0100
committerColm Donelan <colm.donelan@arm.com>2023-07-03 17:21:24 +0000
commit9414936e62ed8cd18cc33c0390bb605a782556c6 (patch)
treee45a2d847c75d67ce47c698d1ddca8e6e47f8a46
parenta9ac6ba643e8dc4fee88bd0e7e186f0918080c4b (diff)
downloadarmnn-9414936e62ed8cd18cc33c0390bb605a782556c6.tar.gz
Replacing use of std::filesystem with ghc::filesystem.
Even though we're using C++ 17 we still do a Debian buster build. This prevents using some new libraries. In this case std::filesystem. Signed-off-by: Colm Donelan <colm.donelan@arm.com> Change-Id: Icdf3460cb5dd0e3ed2f07fccc5b89bd8975d488d
-rw-r--r--tests/ExecuteNetwork/FileComparisonExecutor.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/ExecuteNetwork/FileComparisonExecutor.cpp b/tests/ExecuteNetwork/FileComparisonExecutor.cpp
index 1675440e8c..e4699acd2e 100644
--- a/tests/ExecuteNetwork/FileComparisonExecutor.cpp
+++ b/tests/ExecuteNetwork/FileComparisonExecutor.cpp
@@ -6,7 +6,7 @@
#include "FileComparisonExecutor.hpp"
#include <NetworkExecutionUtils/NetworkExecutionUtils.hpp>
#include <algorithm>
-#include <filesystem>
+#include <ghc/filesystem.hpp>
#include <iterator>
using namespace armnn;
@@ -166,14 +166,14 @@ void ReadData(const std::vector<char>& buffer,
*/
Tensor ReadTensorFromFile(const std::string fileName)
{
- if (!std::filesystem::exists(fileName))
+ if (!ghc::filesystem::exists(fileName))
{
throw FileNotFoundException("The file \"" + fileName + "\" could not be found.");
}
// The format we are reading in is based on NetworkExecutionUtils::WriteToFile. This could potentially
// be an enormous tensor. We'll limit what we can read in to 1Mb.
std::uintmax_t maxFileSize = 1048576;
- std::uintmax_t fileSize = std::filesystem::file_size(fileName);
+ std::uintmax_t fileSize = ghc::filesystem::file_size(fileName);
if (fileSize > maxFileSize)
{
throw InvalidArgumentException("The file \"" + fileName + "\" exceeds max size of 1 Mb.");
@@ -263,7 +263,7 @@ std::vector<const void*> FileComparisonExecutor::Execute()
std::string substr;
getline(ss, substr, ',');
// Check the file exist.
- if (!std::filesystem::exists(substr))
+ if (!ghc::filesystem::exists(substr))
{
errorString += substr + " ";
}