From b59ba684aef4bef16262a1825e787a55fc992f0d Mon Sep 17 00:00:00 2001 From: Kshitij Sisodia Date: Tue, 23 Nov 2021 17:19:52 +0000 Subject: 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 --- tests/common/PlatformMathTests.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests') 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 inputA{0,1,2,9,M_PI}; - uint32_t len = inputA.size(); + size_t len = inputA.size(); std::vector 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 input {0.0, 0.0, 0.5, 0.5,1,1}; - int inputLen = input.size(); + size_t inputLen = input.size(); std::vector expectedResult {0.0, 0.5, 2,}; - int outputLen = inputLen/2; + size_t outputLen = inputLen/2; std::vectoroutput(outputLen); /* Pass pointers to input/output vectors as this function over-writes the first half -- cgit v1.2.1