diff options
author | Derek Lamberti <derek.lamberti@arm.com> | 2019-11-26 16:38:31 +0000 |
---|---|---|
committer | Derek Lamberti <derek.lamberti@arm.com> | 2019-12-05 15:35:51 +0000 |
commit | 08446976e3b6ce0e02f22b391b37aacaad181e1a (patch) | |
tree | b57106c6a3e28662adb2592ac3e850a8f19b6ec7 /tests/MnistDatabase.cpp | |
parent | a3b31f010004ed397ec04325edf7020984847f21 (diff) | |
download | armnn-08446976e3b6ce0e02f22b391b37aacaad181e1a.tar.gz |
Replace boost logging with simple logger
!referencetests:214319
* Reduces arm nn binary size ~15%
* Also fixed test logging black hole issues
Change-Id: Iba27db304d9a8088fa46aeb0b52225d93bb56bc8
Signed-off-by: Derek Lamberti <derek.lamberti@arm.com>
Diffstat (limited to 'tests/MnistDatabase.cpp')
-rw-r--r-- | tests/MnistDatabase.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/MnistDatabase.cpp b/tests/MnistDatabase.cpp index d2fe1649f3..bd5029f841 100644 --- a/tests/MnistDatabase.cpp +++ b/tests/MnistDatabase.cpp @@ -4,8 +4,9 @@ // #include "MnistDatabase.hpp" +#include <armnn/Logging.hpp> + #include <boost/numeric/conversion/cast.hpp> -#include <boost/log/trivial.hpp> #include <boost/assert.hpp> #include <fstream> #include <vector> @@ -36,12 +37,12 @@ std::unique_ptr<MnistDatabase::TTestCaseData> MnistDatabase::GetTestCaseData(uns if (!imageStream.is_open()) { - BOOST_LOG_TRIVIAL(fatal) << "Failed to load " << imagePath; + ARMNN_LOG(fatal) << "Failed to load " << imagePath; return nullptr; } if (!labelStream.is_open()) { - BOOST_LOG_TRIVIAL(fatal) << "Failed to load " << imagePath; + ARMNN_LOG(fatal) << "Failed to load " << imagePath; return nullptr; } @@ -51,13 +52,13 @@ std::unique_ptr<MnistDatabase::TTestCaseData> MnistDatabase::GetTestCaseData(uns imageStream.read(reinterpret_cast<char*>(&magic), sizeof(magic)); if (magic != 0x03080000) { - BOOST_LOG_TRIVIAL(fatal) << "Failed to read " << imagePath; + ARMNN_LOG(fatal) << "Failed to read " << imagePath; return nullptr; } labelStream.read(reinterpret_cast<char*>(&magic), sizeof(magic)); if (magic != 0x01080000) { - BOOST_LOG_TRIVIAL(fatal) << "Failed to read " << labelPath; + ARMNN_LOG(fatal) << "Failed to read " << labelPath; return nullptr; } @@ -79,12 +80,12 @@ std::unique_ptr<MnistDatabase::TTestCaseData> MnistDatabase::GetTestCaseData(uns if (!imageStream.good()) { - BOOST_LOG_TRIVIAL(fatal) << "Failed to read " << imagePath; + ARMNN_LOG(fatal) << "Failed to read " << imagePath; return nullptr; } if (!labelStream.good()) { - BOOST_LOG_TRIVIAL(fatal) << "Failed to read " << labelPath; + ARMNN_LOG(fatal) << "Failed to read " << labelPath; return nullptr; } |