From d58f76a76814a6e4682f39ba2e9205649a092d68 Mon Sep 17 00:00:00 2001 From: Christophe Favergeon Date: Tue, 31 Aug 2021 07:17:24 +0200 Subject: [PATCH] CMSIS-DSP: Correcting issue 1291 Test was wrongly assuming a complex matrix / vector and so the buffer sizes were too big. --- Testing/Source/Tests/UnaryTestsF16.cpp | 12 ++++++------ Testing/Source/Tests/UnaryTestsF32.cpp | 12 ++++++------ Testing/Source/Tests/UnaryTestsQ15.cpp | 14 +++++++------- Testing/Source/Tests/UnaryTestsQ31.cpp | 14 +++++++------- Testing/Source/Tests/UnaryTestsQ7.cpp | 14 +++++++------- 5 files changed, 33 insertions(+), 33 deletions(-) diff --git a/Testing/Source/Tests/UnaryTestsF16.cpp b/Testing/Source/Tests/UnaryTestsF16.cpp index 60a89059..d772b028 100755 --- a/Testing/Source/Tests/UnaryTestsF16.cpp +++ b/Testing/Source/Tests/UnaryTestsF16.cpp @@ -129,13 +129,13 @@ Comparison for Cholesky int rows,internal; \ int i; -#define PREPAREVECDATA2() \ - in1.numRows=rows; \ +#define PREPAREVECDATA2() \ + in1.numRows=rows; \ in1.numCols=internal; \ - memcpy((void*)ap,(const void*)inp1,2*sizeof(float16_t)*rows*internal);\ - in1.pData = ap; \ - \ - memcpy((void*)bp,(const void*)inp2,2*sizeof(float16_t)*internal); + memcpy((void*)ap,(const void*)inp1,sizeof(float16_t)*rows*internal);\ + in1.pData = ap; \ + \ + memcpy((void*)bp,(const void*)inp2,sizeof(float16_t)*internal); diff --git a/Testing/Source/Tests/UnaryTestsF32.cpp b/Testing/Source/Tests/UnaryTestsF32.cpp index 714f6fc7..cd994510 100755 --- a/Testing/Source/Tests/UnaryTestsF32.cpp +++ b/Testing/Source/Tests/UnaryTestsF32.cpp @@ -134,13 +134,13 @@ Comparison for Cholesky int rows,internal; \ int i; -#define PREPAREVECDATA2() \ - in1.numRows=rows; \ +#define PREPAREVECDATA2() \ + in1.numRows=rows; \ in1.numCols=internal; \ - memcpy((void*)ap,(const void*)inp1,2*sizeof(float32_t)*rows*internal);\ - in1.pData = ap; \ - \ - memcpy((void*)bp,(const void*)inp2,2*sizeof(float32_t)*internal); + memcpy((void*)ap,(const void*)inp1,sizeof(float32_t)*rows*internal);\ + in1.pData = ap; \ + \ + memcpy((void*)bp,(const void*)inp2,sizeof(float32_t)*internal); #define PREPAREDATALL1() \ in1.numRows=rows; \ diff --git a/Testing/Source/Tests/UnaryTestsQ15.cpp b/Testing/Source/Tests/UnaryTestsQ15.cpp index 722fa7e9..eaf43648 100755 --- a/Testing/Source/Tests/UnaryTestsQ15.cpp +++ b/Testing/Source/Tests/UnaryTestsQ15.cpp @@ -106,13 +106,13 @@ a double precision computation. int rows,internal; \ int i; -#define PREPAREVECDATA2() \ - in1.numRows=rows; \ - in1.numCols=internal; \ - memcpy((void*)ap,(const void*)inp1,2*sizeof(q15_t)*rows*internal);\ - in1.pData = ap; \ - \ - memcpy((void*)bp,(const void*)inp2,2*sizeof(q15_t)*internal); +#define PREPAREVECDATA2() \ + in1.numRows=rows; \ + in1.numCols=internal; \ + memcpy((void*)ap,(const void*)inp1,sizeof(q15_t)*rows*internal);\ + in1.pData = ap; \ + \ + memcpy((void*)bp,(const void*)inp2,sizeof(q15_t)*internal); void UnaryTestsQ15::test_mat_vec_mult_q15() diff --git a/Testing/Source/Tests/UnaryTestsQ31.cpp b/Testing/Source/Tests/UnaryTestsQ31.cpp index 09412399..f17d8d1a 100755 --- a/Testing/Source/Tests/UnaryTestsQ31.cpp +++ b/Testing/Source/Tests/UnaryTestsQ31.cpp @@ -106,13 +106,13 @@ a double precision computation. int rows,internal; \ int i; -#define PREPAREVECDATA2() \ - in1.numRows=rows; \ - in1.numCols=internal; \ - memcpy((void*)ap,(const void*)inp1,2*sizeof(q31_t)*rows*internal);\ - in1.pData = ap; \ - \ - memcpy((void*)bp,(const void*)inp2,2*sizeof(q31_t)*internal); +#define PREPAREVECDATA2() \ + in1.numRows=rows; \ + in1.numCols=internal; \ + memcpy((void*)ap,(const void*)inp1,sizeof(q31_t)*rows*internal);\ + in1.pData = ap; \ + \ + memcpy((void*)bp,(const void*)inp2,sizeof(q31_t)*internal); void UnaryTestsQ31::test_mat_vec_mult_q31() diff --git a/Testing/Source/Tests/UnaryTestsQ7.cpp b/Testing/Source/Tests/UnaryTestsQ7.cpp index 4d7202ad..6e4200b9 100755 --- a/Testing/Source/Tests/UnaryTestsQ7.cpp +++ b/Testing/Source/Tests/UnaryTestsQ7.cpp @@ -90,13 +90,13 @@ a double precision computation. int rows,internal; \ int i; -#define PREPAREVECDATA2() \ - in1.numRows=rows; \ - in1.numCols=internal; \ - memcpy((void*)ap,(const void*)inp1,2*sizeof(q7_t)*rows*internal);\ - in1.pData = ap; \ - \ - memcpy((void*)bp,(const void*)inp2,2*sizeof(q7_t)*internal); +#define PREPAREVECDATA2() \ + in1.numRows=rows; \ + in1.numCols=internal; \ + memcpy((void*)ap,(const void*)inp1,sizeof(q7_t)*rows*internal);\ + in1.pData = ap; \ + \ + memcpy((void*)bp,(const void*)inp2,sizeof(q7_t)*internal); void UnaryTestsQ7::test_mat_vec_mult_q7() {