2072 COMPLEX*16 zero, half, one
2073 parameter ( zero = ( 0.0d0, 0.0d0 ),
2074 $ half = ( 0.5d0, 0.0d0 ),
2075 $ one = ( 1.0d0, 0.0d0 ) )
2076 DOUBLE PRECISION rzero
2077 parameter ( rzero = 0.0d0 )
2079 DOUBLE PRECISION eps, thresh
2080 INTEGER incmax, nalf, nidim, ninc, nmax, nout, ntra
2081 LOGICAL fatal, rewi, trace
2084 COMPLEX*16 a( nmax, nmax ), aa( nmax*nmax ), alf( nalf ),
2085 $ as( nmax*nmax ), x( nmax ), xs( nmax*incmax ),
2086 $ xx( nmax*incmax ), y( nmax ),
2087 $ ys( nmax*incmax ), yt( nmax ),
2088 $ yy( nmax*incmax ), z( nmax, 2 )
2089 DOUBLE PRECISION g( nmax )
2090 INTEGER idim( nidim ), inc( ninc )
2092 COMPLEX*16 alpha, als, transl
2093 DOUBLE PRECISION err, errmax
2094 INTEGER i, ia, ic, in, incx, incxs, incy, incys, ix,
2095 $ iy, j, ja, jj, laa, lda, ldas, lj, lx, ly, n,
2097 LOGICAL full, null, packed, reset, same, upper
2098 CHARACTER*1 uplo, uplos
2109 INTRINSIC abs, dconjg, max
2111 INTEGER infot, noutc
2114 COMMON /infoc/infot, noutc, ok, lerr
2118 full = sname( 3: 3 ).EQ.
'E'
2119 packed = sname( 3: 3 ).EQ.
'P'
2123 ELSE IF( packed )
THEN
2131 DO 140 in = 1, nidim
2141 laa = ( n*( n + 1 ) )/2
2147 uplo = ich( ic: ic )
2157 CALL zmake(
'GE',
' ',
' ', 1, n, x, 1, xx, abs( incx ),
2158 $ 0, n - 1, reset, transl )
2161 xx( 1 + abs( incx )*( n/2 - 1 ) ) = zero
2171 CALL zmake(
'GE',
' ',
' ', 1, n, y, 1, yy,
2172 $ abs( incy ), 0, n - 1, reset, transl )
2175 yy( 1 + abs( incy )*( n/2 - 1 ) ) = zero
2180 null = n.LE.0.OR.alpha.EQ.zero
2185 CALL zmake( sname( 2: 3 ), uplo,
' ', n, n, a,
2186 $ nmax, aa, lda, n - 1, n - 1, reset,
2213 $
WRITE( ntra, fmt = 9993 )nc, sname, uplo, n,
2214 $ alpha, incx, incy, lda
2217 CALL zher2( uplo, n, alpha, xx, incx, yy, incy,
2219 ELSE IF( packed )
THEN
2221 $
WRITE( ntra, fmt = 9994 )nc, sname, uplo, n,
2225 CALL zhpr2( uplo, n, alpha, xx, incx, yy, incy,
2232 WRITE( nout, fmt = 9992 )
2239 isame( 1 ) = uplo.EQ.uplos
2240 isame( 2 ) = ns.EQ.n
2241 isame( 3 ) = als.EQ.alpha
2242 isame( 4 ) =
lze( xs, xx, lx )
2243 isame( 5 ) = incxs.EQ.incx
2244 isame( 6 ) =
lze( ys, yy, ly )
2245 isame( 7 ) = incys.EQ.incy
2247 isame( 8 ) =
lze( as, aa, laa )
2249 isame( 8 ) =
lzeres( sname( 2: 3 ), uplo, n, n,
2252 IF( .NOT.packed )
THEN
2253 isame( 9 ) = ldas.EQ.lda
2260 same = same.AND.isame( i )
2261 IF( .NOT.isame( i ) )
2262 $
WRITE( nout, fmt = 9998 )i
2279 z( i, 1 ) = x( n - i + 1 )
2288 z( i, 2 ) = y( n - i + 1 )
2293 w( 1 ) = alpha*dconjg( z( j, 2 ) )
2294 w( 2 ) = dconjg( alpha )*dconjg( z( j, 1 ) )
2302 CALL zmvch(
'N', lj, 2, one, z( jj, 1 ),
2303 $ nmax, w, 1, one, a( jj, j ), 1,
2304 $ yt, g, aa( ja ), eps, err, fatal,
2315 errmax = max( errmax, err )
2338 IF( errmax.LT.thresh )
THEN
2339 WRITE( nout, fmt = 9999 )sname, nc
2341 WRITE( nout, fmt = 9997 )sname, nc, errmax
2346 WRITE( nout, fmt = 9995 )j
2349 WRITE( nout, fmt = 9996 )sname
2351 WRITE( nout, fmt = 9993 )nc, sname, uplo, n, alpha, incx,
2353 ELSE IF( packed )
THEN
2354 WRITE( nout, fmt = 9994 )nc, sname, uplo, n, alpha, incx, incy
2360 9999
FORMAT(
' ', a6,
' PASSED THE COMPUTATIONAL TESTS (', i6,
' CALL',
2362 9998
FORMAT(
' ******* FATAL ERROR - PARAMETER NUMBER ', i2,
' WAS CH',
2363 $
'ANGED INCORRECTLY *******' )
2364 9997
FORMAT(
' ', a6,
' COMPLETED THE COMPUTATIONAL TESTS (', i6,
' C',
2365 $
'ALLS)', /
' ******* BUT WITH MAXIMUM TEST RATIO', f8.2,
2366 $
' - SUSPECT *******' )
2367 9996
FORMAT(
' ******* ', a6,
' FAILED ON CALL NUMBER:' )
2368 9995
FORMAT(
' THESE ARE THE RESULTS FOR COLUMN ', i3 )
2369 9994
FORMAT( 1x, i6,
': ', a6,
'(''', a1,
''',', i3,
',(', f4.1,
',',
2370 $ f4.1,
'), X,', i2,
', Y,', i2,
', AP) ',
2372 9993
FORMAT( 1x, i6,
': ', a6,
'(''', a1,
''',', i3,
',(', f4.1,
',',
2373 $ f4.1,
'), X,', i2,
', Y,', i2,
', A,', i3,
') ',
2375 9992
FORMAT(
' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
subroutine zhpr2(UPLO, N, ALPHA, X, INCX, Y, INCY, AP)
ZHPR2
logical function lzeres(TYPE, UPLO, M, N, AA, AS, LDA)
subroutine zmake(TYPE, UPLO, DIAG, M, N, A, NMAX, AA, LDA, KL, KU, RESET, TRANSL)
subroutine zher2(UPLO, N, ALPHA, X, INCX, Y, INCY, A, LDA)
ZHER2
logical function lze(RI, RJ, LR)
subroutine zmvch(TRANS, M, N, ALPHA, A, NMAX, X, INCX, BETA, Y, INCY, YT, G, YY, EPS, ERR, FATAL, NOUT, MV)