diff options
author | Francis Murtagh <francis.murtagh@arm.com> | 2020-06-29 11:50:01 +0100 |
---|---|---|
committer | Colm Donelan <colm.donelan@arm.com> | 2020-06-30 11:29:07 +0000 |
commit | 532a29d12d72f54549d8b71edd485c17af65698a (patch) | |
tree | 6748cc16706f52f413f7b2163a41d4807387cdf8 /tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp | |
parent | 3b90af6bb79639d3813f21f3c3017503ee0c66af (diff) | |
download | armnn-532a29d12d72f54549d8b71edd485c17af65698a.tar.gz |
IVGCVSW-4487 Remove boost::filesystem
* Replace filesystem::path
* Replace filesystem::exists
* Replace filesystem::is_directory
* Replace filesystem::directory_iterator
* Replace filesystem::filesystem_error exception
* Replace filesystem::temp_directory_path
* Replace filesystem::unique path
* Replace filesystem::ofstream with std::ofstream
* Replace filesystem::remove
* Replace filesystem::is_regular_file
* Replace boost::optional with armnn::Optional in touched files
* Remove some superfluous includes
* Update build guides, GlobalConfig.cmake and CMakeLists.txt
* Remove redundant armnnUtils::Filesystem::Remove function.
* Remove redundant armnnUtils::Filesystem::GetFileSize function.
Temporarily adding back Boost::filesystem to enable Boost::dll.
Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
Signed-off-by: Colm Donelan <Colm.Donelan@arm.com>
Change-Id: Ifa46d4a0097d2612ddacd8e9736c0b36e365fb11
Diffstat (limited to 'tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp')
-rw-r--r-- | tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp b/tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp index 85d757f820..be45d9af35 100644 --- a/tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp +++ b/tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp @@ -7,8 +7,8 @@ #include "../InferenceTest.hpp" #include "ModelAccuracyChecker.hpp" #include "armnnDeserializer/IDeserializer.hpp" +#include <Filesystem.hpp> -#include <boost/filesystem.hpp> #include <boost/program_options/variables_map.hpp> #include <boost/range/iterator_range.hpp> #include <map> @@ -49,7 +49,6 @@ int main(int argc, char* argv[]) { try { - using namespace boost::filesystem; armnn::LogSeverity level = armnn::LogSeverity::Debug; armnn::ConfigureLogging(true, true, level); @@ -195,8 +194,8 @@ int main(int argc, char* argv[]) std::vector<BindingPointInfo> outputBindings = { m_OutputBindingInfo }; // Load model output labels - if (modelOutputLabelsPath.empty() || !boost::filesystem::exists(modelOutputLabelsPath) || - !boost::filesystem::is_regular_file(modelOutputLabelsPath)) + if (modelOutputLabelsPath.empty() || !fs::exists(modelOutputLabelsPath) || + !fs::is_regular_file(modelOutputLabelsPath)) { ARMNN_LOG(fatal) << "Invalid model output labels path at " << modelOutputLabelsPath; } @@ -225,7 +224,7 @@ int main(int argc, char* argv[]) // Validate blacklist file if it's specified if (!blacklistPath.empty() && - !(boost::filesystem::exists(blacklistPath) && boost::filesystem::is_regular_file(blacklistPath))) + !(fs::exists(blacklistPath) && fs::is_regular_file(blacklistPath))) { ARMNN_LOG(fatal) << "Invalid path to blacklist file at " << blacklistPath; return 1; @@ -309,7 +308,7 @@ int main(int argc, char* argv[]) vector<TContainer> inputDataContainers; vector<TContainer> outputDataContainers; - auto imagePath = pathToDataDir / boost::filesystem::path(imageName); + auto imagePath = pathToDataDir / fs::path(imageName); switch (inputTensorDataType) { case armnn::DataType::Signed32: @@ -393,11 +392,11 @@ map<std::string, std::string> LoadValidationImageFilenamesAndLabels(const string // Populate imageFilenames with names of all .JPEG, .PNG images std::vector<std::string> imageFilenames; for (const auto& imageEntry : - boost::make_iterator_range(boost::filesystem::directory_iterator(boost::filesystem::path(imageDirectoryPath)))) + boost::make_iterator_range(fs::directory_iterator(fs::path(imageDirectoryPath)))) { - boost::filesystem::path imagePath = imageEntry.path(); + fs::path imagePath = imageEntry.path(); std::string imageExtension = boost::to_upper_copy<std::string>(imagePath.extension().string()); - if (boost::filesystem::is_regular_file(imagePath) && (imageExtension == ".JPEG" || imageExtension == ".PNG")) + if (fs::is_regular_file(imagePath) && (imageExtension == ".JPEG" || imageExtension == ".PNG")) { imageFilenames.push_back(imagePath.filename().string()); } |