34 parameter ( nmax = 1000, its = 50000 )
38 REAL ALPHA, AVG, T1, T2, TNOSEC, TOTAL
41 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' )
116 SUBROUTINE mysub(N,X,Y)
real function second()
SECOND Using ETIME
subroutine mysub(N, X, Y)