38 parameter ( nmax = 1000, its = 50000 )
42 DOUBLE PRECISION ALPHA, AVG, T1, T2, TNOSEC, TOTAL
45 DOUBLE PRECISION X( nmax ), Y( nmax )
48 DOUBLE PRECISION DSECND
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' )
120 SUBROUTINE mysub(N,X,Y)
122 DOUBLE PRECISION X(n), Y(n)
double precision function dsecnd()
DSECND Using ETIME
subroutine mysub(N, X, Y)