Skip to content

Commit

Permalink
Merge pull request #4634 from martin-frbg/utest0
Browse files Browse the repository at this point in the history
Fix uninitialized variables in the extensions utest
  • Loading branch information
martin-frbg authored Apr 13, 2024
2 parents 83ec1f8 + b883526 commit b8618fa
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion utest/test_extensions/test_damin.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,4 +351,4 @@ CTEST(damin, negative_step_2_N_70){
double amin = BLASFUNC(damin)(&N, x, &inc);
ASSERT_DBL_NEAR_TOL(1.0, amin, DOUBLE_EPS);
}
#endif
#endif
4 changes: 3 additions & 1 deletion utest/test_extensions/test_dsum.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ CTEST(dsum, step_zero){
blasint i;
blasint N = ELEMENTS, inc = 0;
double x[ELEMENTS];
x[0]=0.;
for (i = 0; i < N * inc; i ++) {
x[i] = i + 1000;
}
Expand Down Expand Up @@ -243,6 +244,7 @@ CTEST(dsum, c_api_step_zero){
blasint i;
blasint N = ELEMENTS, inc = 0;
double x[ELEMENTS];
x[0]=0.;
for (i = 0; i < N * inc; i ++) {
x[i] = i + 1000;
}
Expand Down Expand Up @@ -400,4 +402,4 @@ CTEST(dsum, c_api_step_2_N_50){
double sum = cblas_dsum(N, x, inc);
ASSERT_DBL_NEAR_TOL(50.0, sum, DOUBLE_EPS);
}
#endif
#endif
4 changes: 3 additions & 1 deletion utest/test_extensions/test_dzsum.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ CTEST(dzsum, step_zero){
blasint i;
blasint N = ELEMENTS, inc = 0;
double x[ELEMENTS];
x[0] = 0.0;
for (i = 0; i < N * inc * 2; i ++) {
x[i] = i + 1000;
}
Expand Down Expand Up @@ -243,6 +244,7 @@ CTEST(dzsum, c_api_step_zero){
blasint i;
blasint N = ELEMENTS, inc = 0;
double x[ELEMENTS];
x[0] = 0.0;
for (i = 0; i < N * inc * 2; i ++) {
x[i] = i + 1000;
}
Expand Down Expand Up @@ -400,4 +402,4 @@ CTEST(dzsum, c_api_step_2_N_50){
double sum = cblas_dzsum(N, x, inc);
ASSERT_DBL_NEAR_TOL(0.0, sum, DOUBLE_EPS);
}
#endif
#endif
4 changes: 3 additions & 1 deletion utest/test_extensions/test_scsum.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ CTEST(scsum, step_zero){
blasint i;
blasint N = ELEMENTS, inc = 0;
float x[ELEMENTS];
x[0] = 0.0f;
for (i = 0; i < N * inc * 2; i ++) {
x[i] = i + 1000;
}
Expand Down Expand Up @@ -243,6 +244,7 @@ CTEST(scsum, c_api_step_zero){
blasint i;
blasint N = ELEMENTS, inc = 0;
float x[ELEMENTS];
x[0] = 0.0f;
for (i = 0; i < N * inc * 2; i ++) {
x[i] = i + 1000;
}
Expand Down Expand Up @@ -400,4 +402,4 @@ CTEST(scsum, c_api_step_2_N_50){
float sum = cblas_scsum(N, x, inc);
ASSERT_DBL_NEAR_TOL(0.0f, sum, SINGLE_EPS);
}
#endif
#endif
4 changes: 3 additions & 1 deletion utest/test_extensions/test_ssum.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ CTEST(ssum, step_zero){
blasint i;
blasint N = ELEMENTS, inc = 0;
float x[ELEMENTS];
x[0] = 0.0f;
for (i = 0; i < N * inc; i ++) {
x[i] = i + 1000;
}
Expand Down Expand Up @@ -243,6 +244,7 @@ CTEST(ssum, c_api_step_zero){
blasint i;
blasint N = ELEMENTS, inc = 0;
float x[ELEMENTS];
x[0] = 0.0f;
for (i = 0; i < N * inc; i ++) {
x[i] = i + 1000;
}
Expand Down Expand Up @@ -400,4 +402,4 @@ CTEST(ssum, c_api_step_2_N_50){
float sum = cblas_ssum(N, x, inc);
ASSERT_DBL_NEAR_TOL(50.0f, sum, SINGLE_EPS);
}
#endif
#endif

0 comments on commit b8618fa

Please sign in to comment.