Ignore:
Timestamp:
Apr 17, 2009, 12:35:37 AM (15 years ago)
Author:
rosiere
Message:

1) Fix bug with previous commit
2) Add test libc
3) Change Dhrystone

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Softwares/Dhrystone/src/c/dhry21a.c

    r112 r114  
    255255  User_Time = End_Time - Begin_Time;
    256256
    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
    258268  {
    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
    265270    Microseconds          = User_Time * Mic_secs_Per_Second / (DOUBLE) Number_Of_Runs;
    266271    Dhrystones_Per_Second = (DOUBLE) Number_Of_Runs / User_Time;
    267272    Vax_Mips              = Dhrystones_Per_Second / 1757.0;
     273#else
     274    Microseconds          = User_Time                       / (DOUBLE) Number_Of_Runs;
     275#endif
    268276
    269277#ifdef ROPT
     
    274282#endif
    275283
     284#ifdef HAVE_DOUBLE
    276285    printf ("Microseconds for one run through Dhrystone : %.1lf  \n",Microseconds);
    277286    printf ("Dhrystones per Second                      : %.1lf \n",Dhrystones_Per_Second);
    278287    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
    279294    printf ("\n");
    280295 
     
    283298  fprintf(Ap,"%s\n",Reg_Define);
    284299
     300#ifdef HAVE_DOUBLE
    285301  fprintf(Ap,"Microseconds for one loop : %.1lf\n",Microseconds);
    286302  fprintf(Ap,"Dhrystones per second     : %.1lf\n",Dhrystones_Per_Second);
    287303  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
    288307  }
    289308  fclose(Ap);
    290309  return 0;
    291  
    292310}
    293311
Note: See TracChangeset for help on using the changeset viewer.