2143 COMPLEX*16 zero, half, one
2144 parameter ( zero = ( 0.0d0, 0.0d0 ),
2145 $ half = ( 0.5d0, 0.0d0 ),
2146 $ one = ( 1.0d0, 0.0d0 ) )
2147 DOUBLE PRECISION rzero
2148 parameter ( rzero = 0.0d0 )
2150 DOUBLE PRECISION eps, thresh
2151 INTEGER incmax, nalf, nidim, ninc, nmax, nout, ntra,
2153 LOGICAL fatal, rewi, trace
2156 COMPLEX*16 a( nmax, nmax ), aa( nmax*nmax ), alf( nalf ),
2157 $ as( nmax*nmax ), x( nmax ), xs( nmax*incmax ),
2158 $ xx( nmax*incmax ), y( nmax ),
2159 $ ys( nmax*incmax ), yt( nmax ),
2160 $ yy( nmax*incmax ), z( nmax, 2 )
2161 DOUBLE PRECISION g( nmax )
2162 INTEGER idim( nidim ), inc( ninc )
2164 COMPLEX*16 alpha, als, transl
2165 DOUBLE PRECISION err, errmax
2166 INTEGER i, ia, ic, in, incx, incxs, incy, incys, ix,
2167 $ iy, j, ja, jj, laa, lda, ldas, lj, lx, ly, n,
2169 LOGICAL full, null, packed, reset, same, upper
2170 CHARACTER*1 uplo, uplos
2182 INTRINSIC abs, dconjg, max
2184 INTEGER infot, noutc
2187 COMMON /infoc/infot, noutc, ok
2191 full = sname( 9: 9 ).EQ.
'e'
2192 packed = sname( 9: 9 ).EQ.
'p'
2196 ELSE IF( packed )
THEN
2204 DO 140 in = 1, nidim
2214 laa = ( n*( n + 1 ) )/2
2220 uplo = ich( ic: ic )
2221 IF (uplo.EQ.
'U')
THEN
2222 cuplo =
' CblasUpper'
2224 cuplo =
' CblasLower'
2235 CALL zmake(
'ge',
' ',
' ', 1, n, x, 1, xx, abs( incx ),
2236 $ 0, n - 1, reset, transl )
2239 xx( 1 + abs( incx )*( n/2 - 1 ) ) = zero
2249 CALL zmake(
'ge',
' ',
' ', 1, n, y, 1, yy,
2250 $ abs( incy ), 0, n - 1, reset, transl )
2253 yy( 1 + abs( incy )*( n/2 - 1 ) ) = zero
2258 null = n.LE.0.OR.alpha.EQ.zero
2263 CALL zmake( sname( 8: 9 ), uplo,
' ', n, n, a,
2264 $ nmax, aa, lda, n - 1, n - 1, reset,
2291 $
WRITE( ntra, fmt = 9993 )nc, sname, cuplo, n,
2292 $ alpha, incx, incy, lda
2295 CALL czher2( iorder, uplo, n, alpha, xx, incx,
2296 $ yy, incy, aa, lda )
2297 ELSE IF( packed )
THEN
2299 $
WRITE( ntra, fmt = 9994 )nc, sname, cuplo, n,
2303 CALL czhpr2( iorder, uplo, n, alpha, xx, incx,
2310 WRITE( nout, fmt = 9992 )
2317 isame( 1 ) = uplo.EQ.uplos
2318 isame( 2 ) = ns.EQ.n
2319 isame( 3 ) = als.EQ.alpha
2320 isame( 4 ) =
lze( xs, xx, lx )
2321 isame( 5 ) = incxs.EQ.incx
2322 isame( 6 ) =
lze( ys, yy, ly )
2323 isame( 7 ) = incys.EQ.incy
2325 isame( 8 ) =
lze( as, aa, laa )
2327 isame( 8 ) =
lzeres( sname( 8: 9 ), uplo, n, n,
2330 IF( .NOT.packed )
THEN
2331 isame( 9 ) = ldas.EQ.lda
2338 same = same.AND.isame( i )
2339 IF( .NOT.isame( i ) )
2340 $
WRITE( nout, fmt = 9998 )i
2357 z( i, 1 ) = x( n - i + 1 )
2366 z( i, 2 ) = y( n - i + 1 )
2371 w( 1 ) = alpha*dconjg( z( j, 2 ) )
2372 w( 2 ) = dconjg( alpha )*dconjg( z( j, 1 ) )
2380 CALL zmvch(
'N', lj, 2, one, z( jj, 1 ),
2381 $ nmax, w, 1, one, a( jj, j ), 1,
2382 $ yt, g, aa( ja ), eps, err, fatal,
2393 errmax = max( errmax, err )
2416 IF( errmax.LT.thresh )
THEN
2417 WRITE( nout, fmt = 9999 )sname, nc
2419 WRITE( nout, fmt = 9997 )sname, nc, errmax
2424 WRITE( nout, fmt = 9995 )j
2427 WRITE( nout, fmt = 9996 )sname
2429 WRITE( nout, fmt = 9993 )nc, sname, cuplo, n, alpha, incx,
2431 ELSE IF( packed )
THEN
2432 WRITE( nout, fmt = 9994 )nc, sname, cuplo, n, alpha, incx, incy
2438 9999
FORMAT(
' ',a12,
' PASSED THE COMPUTATIONAL TESTS (', i6,
' CALL',
2440 9998
FORMAT(
' ******* FATAL ERROR - PARAMETER NUMBER ', i2,
' WAS CH',
2441 $
'ANGED INCORRECTLY *******' )
2442 9997
FORMAT(
' ',a12,
' COMPLETED THE COMPUTATIONAL TESTS (', i6,
' C',
2443 $
'ALLS)', /
' ******* BUT WITH MAXIMUM TEST RATIO', f8.2,
2444 $
' - SUSPECT *******' )
2445 9996
FORMAT(
' ******* ',a12,
' FAILED ON CALL NUMBER:' )
2446 9995
FORMAT(
' THESE ARE THE RESULTS FOR COLUMN ', i3 )
2447 9994
FORMAT(1x, i6,
': ',a12,
'(', a14,
',', i3,
',(', f4.1,
',',
2448 $ f4.1,
'), X,', i2,
', Y,', i2,
', AP) .' )
2449 9993
FORMAT(1x, i6,
': ',a12,
'(', a14,
',', i3,
',(', f4.1,
',',
2450 $ f4.1,
'), X,', i2,
', Y,', i2,
', A,', i3,
') .' )
2451 9992
FORMAT(
' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
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)
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)