31 parameter( nmax = 1000, its = 50000 )
35 REAL alpha, avg, t1, t2, tnosec, total
38 REAL x( nmax ), y( nmax )
53 total = real(nmax) * real(its) * 2.0
58 x( i ) = real( 1 ) / real( i )
59 y( i ) = real( nmax-i ) / real( nmax )
68 y( i ) = y( i ) + alpha*x( i )
74 WRITE( 6, 9999 )total, tnosec
75 IF( tnosec.GT.0.0 )
THEN
76 WRITE( 6, 9998 )(total/1.0e6)/tnosec
86 y( i ) = y( i ) + alpha*x( i )
95 WRITE( 6, 9997 )t2 - t1
96 avg = ( ( t2-t1 ) - tnosec ) * 1000.0e+00/real( its )
103 IF(( avg.GT.0.0 ).AND.( tnosec.GT.0.0 ))
104 $
WRITE( 6, 9995 )(avg/1000) * total / tnosec
106 9999
FORMAT(
' Time for ', g10.3,
' SAXPY ops = ', g10.3,
' seconds' )
107 9998
FORMAT(
' SAXPY performance rate = ', g10.3,
' mflops ' )
108 9997
FORMAT(
' Including SECOND, time = ', g10.3,
' seconds' )
109 9996
FORMAT(
' Average time for SECOND = ', g10.3,
111 9995
FORMAT(
' Equivalent floating point ops = ', g10.3,
' ops' )
112 9994
FORMAT(
' *** Warning: Time for operations was less or equal',
113 $
' than zero => timing in TESTING might be dubious' )
subroutine mysub(n, x, y)
real function second()
SECOND Using ETIME