aboutsummaryrefslogtreecommitdiff
path: root/tests/MnistDatabase.cpp
diff options
context:
space:
mode:
authortelsoa01 <telmo.soares@arm.com>2018-08-31 09:22:23 +0100
committertelsoa01 <telmo.soares@arm.com>2018-08-31 09:22:23 +0100
commitc577f2c6a3b4ddb6ba87a882723c53a248afbeba (patch)
treebd7d4c148df27f8be6649d313efb24f536b7cf34 /tests/MnistDatabase.cpp
parent4c7098bfeab1ffe1cdc77f6c15548d3e73274746 (diff)
downloadarmnn-c577f2c6a3b4ddb6ba87a882723c53a248afbeba.tar.gz
Release 18.08
Diffstat (limited to 'tests/MnistDatabase.cpp')
-rw-r--r--tests/MnistDatabase.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/MnistDatabase.cpp b/tests/MnistDatabase.cpp
index 5c10b0c2b4..2ca39ef6de 100644
--- a/tests/MnistDatabase.cpp
+++ b/tests/MnistDatabase.cpp
@@ -47,7 +47,7 @@ std::unique_ptr<MnistDatabase::TTestCaseData> MnistDatabase::GetTestCaseData(uns
unsigned int magic, num, row, col;
- // check the files have the correct header
+ // Checks the files have the correct header.
imageStream.read(reinterpret_cast<char*>(&magic), sizeof(magic));
if (magic != 0x03080000)
{
@@ -61,8 +61,8 @@ std::unique_ptr<MnistDatabase::TTestCaseData> MnistDatabase::GetTestCaseData(uns
return nullptr;
}
- // Endian swap image and label file - All the integers in the files are stored in MSB first(high endian) format,
- // hence need to flip the bytes of the header if using it on Intel processors or low-endian machines
+ // Endian swaps the image and label file - all the integers in the files are stored in MSB first(high endian)
+ // format, hence it needs to flip the bytes of the header if using it on Intel processors or low-endian machines
labelStream.read(reinterpret_cast<char*>(&num), sizeof(num));
imageStream.read(reinterpret_cast<char*>(&num), sizeof(num));
EndianSwap(num);
@@ -71,7 +71,7 @@ std::unique_ptr<MnistDatabase::TTestCaseData> MnistDatabase::GetTestCaseData(uns
imageStream.read(reinterpret_cast<char*>(&col), sizeof(col));
EndianSwap(col);
- // read image and label into memory
+ // Reads image and label into memory.
imageStream.seekg(testCaseId * g_kMnistImageByteSize, std::ios_base::cur);
imageStream.read(reinterpret_cast<char*>(&I[0]), g_kMnistImageByteSize);
labelStream.seekg(testCaseId, std::ios_base::cur);