Skip to content

Commit

Permalink
Merge pull request OpenMathLib#2873 from martin-frbg/issue2871
Browse files Browse the repository at this point in the history
Check for __linux rather than linux in cpuid code and benchmarks
  • Loading branch information
martin-frbg authored Oct 1, 2020
2 parents 9637cd1 + 5464eb1 commit d3c0d68
Show file tree
Hide file tree
Showing 56 changed files with 63 additions and 61 deletions.
2 changes: 1 addition & 1 deletion benchmark/amax.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}

#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/amin.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}

#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/asum.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ int main(int argc, char *argv[]){
}


#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/axpby.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}

#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/axpy.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}

#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/copy.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}

#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/dot.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}

#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/geev.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ int main(int argc, char *argv[]){
}


#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/gemm.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}

#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/gemm3m.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ int main(int argc, char *argv[]){
loops = atoi(p);


#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/gemv.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}

#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/ger.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}

#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/gesv.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}

#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/getri.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ int main(int argc, char *argv[]){
}


#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/hbmv.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ int main(int argc, char *argv[]){
exit(1);
}

#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/hemm.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ int main(int argc, char *argv[]){



#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/hemv.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}

#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/her.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ int main(int argc, char *argv[]){



#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/her2.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}

#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/her2k.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ int main(int argc, char *argv[]){



#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/herk.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ int main(int argc, char *argv[]){



#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/hpmv.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ int main(int argc, char *argv[]){
exit(1);
}

#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/iamax.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}

#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/iamin.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}

#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/imax.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}

#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/imin.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}

#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/linpack.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}

#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/max.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}

#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/min.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}

#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/nrm2.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}

#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/rot.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}

#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/rotm.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ int main(int argc, char *argv[])
exit(1);
}

#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/scal.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}

#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/spmv.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}

#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/spr.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}

#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/spr2.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}

#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/swap.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}

#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/symm.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ int main(int argc, char *argv[]){



#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/symv.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}

#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/syr.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}

#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/syr2.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ int main(int argc, char *argv[]){



#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/syr2k.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ int main(int argc, char *argv[]){



#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/syrk.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ int main(int argc, char *argv[]){



#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
2 changes: 1 addition & 1 deletion benchmark/tpmv.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ int main(int argc, char *argv[])
fprintf(stderr,"Out of Memory!!\n");exit(1);
}

#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

Expand Down
Loading

0 comments on commit d3c0d68

Please sign in to comment.