diff options
author | Kshitij Sisodia <kshitij.sisodia@arm.com> | 2021-11-23 17:19:52 +0000 |
---|---|---|
committer | Kshitij Sisodia <kshitij.sisodia@arm.com> | 2021-11-23 17:19:52 +0000 |
commit | b59ba684aef4bef16262a1825e787a55fc992f0d (patch) | |
tree | 389e667ef3132727386e0800c0a63d676693185f /tests/common/PlatformMathTests.cpp | |
parent | 37926c819f77a6fe9e3ae913486ac6fc78bd2bd0 (diff) | |
download | ml-embedded-evaluation-kit-b59ba684aef4bef16262a1825e787a55fc992f0d.tar.gz |
MLECO-1935: All common CMake user options consolidated.
For easier look up and maintenance, all common CMake user options
have been consolidated in one CMake file.
NOTE: the individual use case specific options are still within
the correspoinding use case CMake files.
Change-Id: Id887f7b2c763f4d3eb997d997cf466684d0089b6
Diffstat (limited to 'tests/common/PlatformMathTests.cpp')
-rw-r--r-- | tests/common/PlatformMathTests.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/common/PlatformMathTests.cpp b/tests/common/PlatformMathTests.cpp index 78bd36a..02653f2 100644 --- a/tests/common/PlatformMathTests.cpp +++ b/tests/common/PlatformMathTests.cpp @@ -140,7 +140,7 @@ TEST_CASE("Test SqrtF32") { /*Test Constants: */ std::vector<float> inputA{0,1,2,9,M_PI}; - uint32_t len = inputA.size(); + size_t len = inputA.size(); std::vector<float> expectedResult{0, 1, 1.414213562, 3, 1.772453851 }; for (size_t i=0; i < len; i++){ @@ -538,13 +538,13 @@ TEST_CASE("Test FFT32") expected_result_random}; arm::app::math::FftInstance fftInstance; /* Iterate over each of the input vectors, calculate FFT and compare with corresponding expected_results vectors */ - for (int j=0; j < input_vectors.size(); j++) { + for (size_t j = 0; j < input_vectors.size(); j++) { uint16_t fftLen = input_vectors[j].size(); arm::app::math::MathUtils::FftInitF32(fftLen, fftInstance); arm::app::math::MathUtils::FftF32(input_vectors[j], output_vectors[j], fftInstance); float tolerance = 10e-4; - for (size_t i=0; i < fftLen/2; i++) { + for (size_t i = 0; i < fftLen/2; i++) { CHECK (output_vectors[j][i] == Approx(expected_results_vectors[j][i]).margin(tolerance)); @@ -586,11 +586,11 @@ TEST_CASE("Test ComplexMagnitudeSquaredF32") /*Test Constants: */ std::vector<float> input {0.0, 0.0, 0.5, 0.5,1,1}; - int inputLen = input.size(); + size_t inputLen = input.size(); std::vector<float> expectedResult {0.0, 0.5, 2,}; - int outputLen = inputLen/2; + size_t outputLen = inputLen/2; std::vector<float>output(outputLen); /* Pass pointers to input/output vectors as this function over-writes the first half |