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' )