summaryrefslogtreecommitdiff
path: root/cleanbench.c
diff options
context:
space:
mode:
Diffstat (limited to 'cleanbench.c')
-rw-r--r--cleanbench.c68
1 files changed, 33 insertions, 35 deletions
diff --git a/cleanbench.c b/cleanbench.c
index 7b8e118..cf627e7 100644
--- a/cleanbench.c
+++ b/cleanbench.c
@@ -10,9 +10,6 @@
** ver 2.0 **
** Rick Grehan, BYTE Magazine **
********************************************
-** NOTE: These benchmarks do NOT check for the presence
-** of an FPU. You have to find that out manually.
-**
** REVISION HISTORY FOR BENCHMARKS
** 9/94 -- First beta. --RG
** 12/94 -- Bug discovered in some of the integer routines
@@ -90,8 +87,9 @@ fpindex=(double)1.0;
** We presume all tests will be run unless told
** otherwise
*/
-for(i=0;i<NUMTESTS;i++)
- tests_to_do[i]=1;
+for (i = 0; i < NUMTESTS; i++) {
+ tests_to_do[i] = TRUE;
+}
/*
** Initialize test data structures to default
@@ -411,7 +409,7 @@ while(fgets(inbuf,39,cfile)!=(char *)NULL)
break;
case PF_DONUM: /* DONUMSORT */
- tests_to_do[TF_NUMSORT]=getflag(eptr);
+ tests_to_do[NUMSORT]=getflag(eptr);
break;
case PF_NUMNUMA: /* NUMNUMARRAYS */
@@ -431,7 +429,7 @@ while(fgets(inbuf,39,cfile)!=(char *)NULL)
break;
case PF_DOSTR: /* DOSTRINGSORT */
- tests_to_do[TF_SSORT]=getflag(eptr);
+ tests_to_do[STRINGSORT]=getflag(eptr);
break;
case PF_STRASIZE: /* STRARRAYSIZE */
@@ -451,7 +449,7 @@ while(fgets(inbuf,39,cfile)!=(char *)NULL)
break;
case PF_DOBITF: /* DOBITFIELD */
- tests_to_do[TF_BITOP]=getflag(eptr);
+ tests_to_do[BITFIELD]=getflag(eptr);
break;
case PF_NUMBITOPS: /* NUMBITOPS */
@@ -471,7 +469,7 @@ while(fgets(inbuf,39,cfile)!=(char *)NULL)
break;
case PF_DOEMF: /* DOEMF */
- tests_to_do[TF_FPEMU]=getflag(eptr);
+ tests_to_do[FPEMULATION]=getflag(eptr);
break;
case PF_EMFASIZE: /* EMFARRAYSIZE */
@@ -490,7 +488,7 @@ while(fgets(inbuf,39,cfile)!=(char *)NULL)
break;
case PF_DOFOUR: /* DOFOUR */
- tests_to_do[TF_FFPU]=getflag(eptr);
+ tests_to_do[FOURIER]=getflag(eptr);
break;
case PF_FOURASIZE: /* FOURASIZE */
@@ -505,7 +503,7 @@ while(fgets(inbuf,39,cfile)!=(char *)NULL)
break;
case PF_DOASSIGN: /* DOASSIGN */
- tests_to_do[TF_ASSIGN]=getflag(eptr);
+ tests_to_do[ASSIGNMENT]=getflag(eptr);
break;
case PF_AARRAYS: /* ASSIGNARRAYS */
@@ -519,7 +517,7 @@ while(fgets(inbuf,39,cfile)!=(char *)NULL)
break;
case PF_DOIDEA: /* DOIDEA */
- tests_to_do[TF_IDEA]=getflag(eptr);
+ tests_to_do[IDEA]=getflag(eptr);
break;
case PF_IDEAASIZE: /* IDEAARRAYSIZE */
@@ -538,7 +536,7 @@ while(fgets(inbuf,39,cfile)!=(char *)NULL)
break;
case PF_DOHUFF: /* DOHUFF */
- tests_to_do[TF_HUFF]=getflag(eptr);
+ tests_to_do[HUFFMAN]=getflag(eptr);
break;
case PF_HUFFASIZE: /* HUFFARRAYSIZE */
@@ -558,7 +556,7 @@ while(fgets(inbuf,39,cfile)!=(char *)NULL)
break;
case PF_DONNET: /* DONNET */
- tests_to_do[TF_NNET]=getflag(eptr);
+ tests_to_do[NEURAL]=getflag(eptr);
break;
case PF_NNETLOOPS: /* NNETLOOPS */
@@ -573,7 +571,7 @@ while(fgets(inbuf,39,cfile)!=(char *)NULL)
break;
case PF_DOLU: /* DOLU */
- tests_to_do[TF_LU]=getflag(eptr);
+ tests_to_do[LINEAR]=getflag(eptr);
break;
case PF_LUNARRAYS: /* LUNUMARRAYS */
@@ -799,25 +797,25 @@ static double getscore(int fid) {
** doing the proper coercion.
*/
switch(fid) {
- case TF_NUMSORT:
+ case NUMSORT:
return(global_numsortstruct.sortspersec);
- case TF_SSORT:
+ case STRINGSORT:
return(global_strsortstruct.sortspersec);
- case TF_BITOP:
+ case BITFIELD:
return(global_bitopstruct.bitopspersec);
- case TF_FPEMU:
+ case FPEMULATION:
return(global_emfloatstruct.emflops);
- case TF_FFPU:
+ case FOURIER:
return(global_fourierstruct.fflops);
- case TF_ASSIGN:
+ case ASSIGNMENT:
return(global_assignstruct.iterspersec);
- case TF_IDEA:
+ case IDEA:
return(global_ideastruct.iterspersec);
- case TF_HUFF:
+ case HUFFMAN:
return(global_huffstruct.iterspersec);
- case TF_NNET:
+ case NEURAL:
return(global_nnetstruct.iterspersec);
- case TF_LU:
+ case LINEAR:
return(global_lustruct.iterspersec);
}
return 0.0;
@@ -831,40 +829,40 @@ static double getscore(int fid) {
*/
static void show_stats (int bid) {
switch(bid) {
- case TF_NUMSORT: /* Numeric sort */
+ case NUMSORT: /* Numeric sort */
printf(" Number of arrays: %d\n", global_numsortstruct.numarrays);
printf(" Array size: %ld\n", global_numsortstruct.arraysize);
break;
- case TF_SSORT: /* String sort */
+ case STRINGSORT: /* String sort */
printf(" Number of arrays: %d\n", global_strsortstruct.numarrays);
printf(" Array size: %ld\n", global_strsortstruct.arraysize);
break;
- case TF_BITOP: /* Bitmap operation */
+ case BITFIELD: /* Bitmap operation */
printf(" Operations array size: %ld\n", global_bitopstruct.bitoparraysize);
printf(" Bitfield array size: %ld\n", global_bitopstruct.bitfieldarraysize);
break;
- case TF_FPEMU: /* Floating-point emulation */
+ case FPEMULATION: /* Floating-point emulation */
printf(" Number of loops: %lu\n", global_emfloatstruct.loops);
printf(" Array size: %lu\n", global_emfloatstruct.arraysize);
break;
- case TF_FFPU: /* Fourier test */
+ case FOURIER: /* Fourier test */
printf(" Number of coefficients: %lu\n", global_fourierstruct.arraysize);
break;
- case TF_ASSIGN:
+ case ASSIGNMENT:
printf(" Number of arrays: %lu\n", global_assignstruct.numarrays);
break;
- case TF_IDEA:
+ case IDEA:
printf(" Array size: %lu\n", global_ideastruct.arraysize);
printf(" Number of loops: %lu\n", global_ideastruct.loops);
break;
- case TF_HUFF:
+ case HUFFMAN:
printf(" Array size: %lu\n", global_huffstruct.arraysize);
printf(" Number of loops: %lu\n", global_huffstruct.loops);
break;
- case TF_NNET:
+ case NEURAL:
printf(" Number of loops: %lu\n", global_nnetstruct.loops);
break;
- case TF_LU:
+ case LINEAR:
printf(" Number of arrays: %lu\n", global_lustruct.numarrays);
break;
}