aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMatthew Sloyan <matthew.sloyan@arm.com>2020-10-06 10:45:32 +0100
committerMatthew Sloyan <matthew.sloyan@arm.com>2020-10-07 16:33:25 +0000
commit2b428034c9f6b2074f72888ce15344dbe55f1978 (patch)
treeb4ba2774b2d068696de951609ee2ca41f3bf9ce8 /tests
parent68db06f466896d063822904915b24190cab92284 (diff)
downloadarmnn-2b428034c9f6b2074f72888ce15344dbe55f1978.tar.gz
IVGCVSW-5405 Remove boost::make_iterator_range and boost::to_upper_copy
* Removed from ModelAccuracyTool-Armnn and ImageCSVFileGenerator * Fixed formatting in ImageCSVFileGenerator Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Change-Id: I09dfca27813582cc48f46d0507680368ed823a9c
Diffstat (limited to 'tests')
-rw-r--r--tests/ImageCSVFileGenerator/ImageCSVFileGenerator.cpp7
-rw-r--r--tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp10
2 files changed, 9 insertions, 8 deletions
diff --git a/tests/ImageCSVFileGenerator/ImageCSVFileGenerator.cpp b/tests/ImageCSVFileGenerator/ImageCSVFileGenerator.cpp
index 5405df9e16..0138c1cfdf 100644
--- a/tests/ImageCSVFileGenerator/ImageCSVFileGenerator.cpp
+++ b/tests/ImageCSVFileGenerator/ImageCSVFileGenerator.cpp
@@ -5,7 +5,6 @@
#include <Filesystem.hpp>
#include <cxxopts/cxxopts.hpp>
-#include <boost/range/iterator_range.hpp>
#include <algorithm>
#include <fstream>
@@ -147,10 +146,10 @@ public:
("h,help", "Display help messages")
("i,indir",
"Directory that .raw files are stored in",
- cxxopts::value<std::string>(m_InputDirectory))
+ cxxopts::value<std::string>(m_InputDirectory))
("o,outfile",
"Output CSV file path",
- cxxopts::value<std::string>(m_OutputFileName))
+ cxxopts::value<std::string>(m_OutputFileName))
("l, layer-binding-id",
"Input layer binding Id, Defaults to 0",
cxxopts::value<std::string>(m_InputBindingId)->default_value("0"));
@@ -209,7 +208,7 @@ int main(int argc, char* argv[])
const std::string bindingId(cmdline.GetInputBindingId());
std::vector<fs::path> rawFiles;
- for (auto& entry : boost::make_iterator_range(fs::directory_iterator(rawDirectory), {}))
+ for (auto& entry : fs::directory_iterator(rawDirectory))
{
if (entry.path().extension().c_str() == fileFormat)
{
diff --git a/tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp b/tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp
index edc7e1cc33..dccf5ffdcd 100644
--- a/tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp
+++ b/tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp
@@ -10,7 +10,6 @@
#include <Filesystem.hpp>
#include <boost/program_options/variables_map.hpp>
-#include <boost/range/iterator_range.hpp>
#include <map>
using namespace armnn::test;
@@ -391,11 +390,14 @@ 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(fs::directory_iterator(fs::path(imageDirectoryPath))))
+ for (const auto& imageEntry : fs::directory_iterator(fs::path(imageDirectoryPath)))
{
fs::path imagePath = imageEntry.path();
- std::string imageExtension = boost::to_upper_copy<std::string>(imagePath.extension().string());
+
+ // Get extension and convert to uppercase
+ std::string imageExtension = imagePath.extension().string();
+ std::transform(imageExtension.begin(), imageExtension.end(), imageExtension.begin(), ::toupper);
+
if (fs::is_regular_file(imagePath) && (imageExtension == ".JPEG" || imageExtension == ".PNG"))
{
imageFilenames.push_back(imagePath.filename().string());