aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFrancis Murtagh <francis.murtagh@arm.com>2023-03-23 11:36:34 +0000
committerTeresaARM <teresa.charlinreyes@arm.com>2023-03-31 09:14:58 +0000
commit6d4e761f12b0ec34294bae1bfafacd8f468e7e0e (patch)
treec2b8db67b273de889b83e4cdb3193664061ce4c6 /tests
parent4047e29c006a478ceaad595f41718ac131c7462d (diff)
downloadarmnn-6d4e761f12b0ec34294bae1bfafacd8f468e7e0e.tar.gz
Bugfix: Fix conversion issue in NetworkExecutionUtils
* conversion from ‘double’ to ‘float’ changes value Signed-off-by: Francis Murtagh <francis.murtagh@arm.com> Change-Id: Iebcc8adea54590fb6153db503e1dfccb082c9bd3
Diffstat (limited to 'tests')
-rw-r--r--tests/NetworkExecutionUtils/test/NetworkExecutionUtilsTests.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/NetworkExecutionUtils/test/NetworkExecutionUtilsTests.cpp b/tests/NetworkExecutionUtils/test/NetworkExecutionUtilsTests.cpp
index d11fe571b0..e93653b373 100644
--- a/tests/NetworkExecutionUtils/test/NetworkExecutionUtilsTests.cpp
+++ b/tests/NetworkExecutionUtils/test/NetworkExecutionUtilsTests.cpp
@@ -24,9 +24,9 @@ TEST_CASE ("ComputeByteLevelRMSE")
// Floats.
const float expectedFloat[] =
- {55.20419, 24.58061, 67.76520, 47.31617, 55.58102, 44.64565, 105.76307, 54.65538, 80.41088, 66.05208};
+ {55.20419f, 24.58061f, 67.76520f, 47.31617f, 55.58102f, 44.64565f, 105.76307f, 54.65538f, 80.41088f, 66.05208f};
const float actualFloat[] =
- {13.87187, 14.16160, 49.28846, 25.89192, 97.70659, 91.30055, 15.88831, 4.79960, 102.99205, 51.28290};
+ {13.87187f, 14.16160f, 49.28846f, 25.89192f, 97.70659f, 91.30055f, 15.88831f, 4.79960f, 102.99205f, 51.28290f};
const double expectedResult = 74.059098023; // Calculated manually.
CHECK(ComputeByteLevelRMSE(expectedFloat, expectedFloat, sizeof(float) * 10) == 0);
CHECK(ComputeByteLevelRMSE(expectedFloat, actualFloat, sizeof(float) * 10) == doctest::Approx(expectedResult));