Skip to content

Commit 9ad9b52

Browse files
authored
Merge pull request #4568 from martin-frbg/fixbenchloops
Fix bad assignment of OPENBLAS_LOOPS variable in several benchmarks
2 parents b4a1153 + 3f1ec74 commit 9ad9b52

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

benchmark/getri.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ int main(int argc, char *argv[]){
9292

9393
if ((p = getenv("OPENBLAS_TEST"))) btest=*p;
9494

95-
if ((p = getenv("OPENBLAS_LOOPS"))) loops=*p;
95+
if ((p = getenv("OPENBLAS_LOOPS"))) loops=atoi(p);
9696

9797
fprintf(stderr, "From : %3d To : %3d Step = %3d\n", from, to, step);
9898

benchmark/linpack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ int main(int argc, char *argv[]){
8585
double time1, time2, timeg1,timeg2;
8686

8787
char *p;
88-
if ((p = getenv("OPENBLAS_LOOPS"))) loops=*p;
88+
if ((p = getenv("OPENBLAS_LOOPS"))) loops=atoi(p);
8989

9090
argc--;argv++;
9191

benchmark/potrf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ int main(int argc, char *argv[]){
120120

121121
if ((p = getenv("OPENBLAS_TEST"))) btest=*p;
122122

123-
if ((p = getenv("OPENBLAS_LOOPS"))) loops=*p;
123+
if ((p = getenv("OPENBLAS_LOOPS"))) loops=atoi(p);
124124

125125
fprintf(stderr, "From : %3d To : %3d Step = %3d Uplo = %c\n", from, to, step,*uplo[uplos]);
126126

benchmark/syr2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ int main(int argc, char *argv[]){
5454
int step = 1;
5555
int loops = 1;
5656

57-
if ((p = getenv("OPENBLAS_LOOPS"))) loops=*p;
57+
if ((p = getenv("OPENBLAS_LOOPS"))) loops=atoi(p);
5858

5959
double time1,timeg;
6060

0 commit comments

Comments
 (0)