GMPbench

Torbjorn Granlund tege@swox.com
03 Dec 2002 15:20:27 +0100


--=-=-=

Jason Moxham <J.L.Moxham@maths.soton.ac.uk> writes:

  what is timing.h in the code ?
  
Here it is:


--=-=-=
Content-Type: application/octet-stream
Content-Disposition: attachment; filename=timing.h

#define TIME(t,func)							\
  do { long int __t0, __times, __t, __tmp;				\
    __times = 1;							\
    {func;}								\
    do									\
      {									\
	__times <<= 1;							\
	__t0 = cputime ();						\
	for (__t = 0; __t < __times; __t++)				\
	  {func;}							\
	__tmp = cputime () - __t0;					\
      }									\
    while (__tmp < 250);						\
    (t) = (double) __tmp / __times;					\
  } while (0)

--=-=-=
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit


-- 
Torbjörn

--=-=-=--