38 parameter( nmax = 1000, its = 50000 )
42 DOUBLE PRECISION alpha, avg, t1, t2, tnosec, total
45 DOUBLE PRECISION x( nmax ), y( nmax )
57 total = dble(nmax) * dble(its) * 2.0
62 x( i ) = dble( 1 ) / dble( i )
63 y( i ) = dble( nmax-i ) / dble( nmax )
72 y( i ) = y( i ) + alpha*x( i )
78 WRITE( 6, 9999 )total, tnosec
79 IF( tnosec.GT.0.0 )
THEN
80 WRITE( 6, 9998 )(total/1.0d6)/tnosec
90 y( i ) = y( i ) + alpha*x( i )
99 WRITE( 6, 9997 )t2 - t1
100 avg = ( ( t2-t1 ) - tnosec ) * 1000.0d+00/dble( its )
102 $
WRITE( 6, 9996 )avg
107 IF(( avg.GT.0.0 ).AND.( tnosec.GT.0.0 ))
108 $
WRITE( 6, 9995 )(avg/1000) * total / tnosec
110 9999 format(
' Time for ', g10.3,
' DAXPY ops = ', g10.3,
' seconds' )
111 9998 format(
' DAXPY performance rate = ', g10.3,
' mflops ' )
112 9997 format(
' Including DSECND, time = ', g10.3,
' seconds' )
113 9996 format(
' Average time for DSECND = ', g10.3,
115 9995 format(
' Equivalent floating point ops = ', g10.3,
' ops' )
116 9994 format(
' *** Warning: Time for operations was less or equal',
117 $
' than zero => timing in TESTING might be dubious' )
122 DOUBLE PRECISION x(n), y(n)