Changeset 114 for trunk/Softwares/Dhrystone/src/c/dhry21a.c
- Timestamp:
- Apr 17, 2009, 12:35:37 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Softwares/Dhrystone/src/c/dhry21a.c
r112 r114 255 255 User_Time = End_Time - Begin_Time; 256 256 257 if (User_Time < Too_Small_Time) 257 // if (User_Time < Too_Small_Time) 258 // { 259 //#ifdef HAVE_DOUBLE 260 // printf ("Measured time too small to obtain meaningful results : %f\n",User_Time); 261 //#else 262 // printf ("Measured time too small to obtain meaningful results : %d\n",User_Time); 263 //#endif 264 // printf ("Please increase number of runs\n"); 265 // printf ("\n"); 266 // } 267 // else 258 268 { 259 printf ("Measured time too small to obtain meaningful results : %f\n",User_Time); 260 printf ("Please increase number of runs\n"); 261 printf ("\n"); 262 } 263 else 264 { 269 #ifdef HAVE_DOUBLE 265 270 Microseconds = User_Time * Mic_secs_Per_Second / (DOUBLE) Number_Of_Runs; 266 271 Dhrystones_Per_Second = (DOUBLE) Number_Of_Runs / User_Time; 267 272 Vax_Mips = Dhrystones_Per_Second / 1757.0; 273 #else 274 Microseconds = User_Time / (DOUBLE) Number_Of_Runs; 275 #endif 268 276 269 277 #ifdef ROPT … … 274 282 #endif 275 283 284 #ifdef HAVE_DOUBLE 276 285 printf ("Microseconds for one run through Dhrystone : %.1lf \n",Microseconds); 277 286 printf ("Dhrystones per Second : %.1lf \n",Dhrystones_Per_Second); 278 287 printf ("VAX MIPS rating : %.3lf \n",Vax_Mips); 288 #else 289 printf ("Begin_Time : %d\n",Begin_Time); 290 printf ("End_Time : %d\n",End_Time ); 291 printf ("User_Time : %d\n",User_Time ); 292 printf ("Numbers of cycle for one run through Dhrystone : %d \n",Microseconds); 293 #endif 279 294 printf ("\n"); 280 295 … … 283 298 fprintf(Ap,"%s\n",Reg_Define); 284 299 300 #ifdef HAVE_DOUBLE 285 301 fprintf(Ap,"Microseconds for one loop : %.1lf\n",Microseconds); 286 302 fprintf(Ap,"Dhrystones per second : %.1lf\n",Dhrystones_Per_Second); 287 303 fprintf(Ap,"VAX MIPS rating : %.3lf\n",Vax_Mips); 304 #else 305 fprintf(Ap,"Numbers of cycle for one loop : %.1d\n",Microseconds); 306 #endif 288 307 } 289 308 fclose(Ap); 290 309 return 0; 291 292 310 } 293 311
Note: See TracChangeset
for help on using the changeset viewer.