148 SUBROUTINE zchktp( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
149 $ NMAX, AP, AINVP, B, X, XACT, WORK, RWORK,
158 INTEGER NMAX, NN, NNS, NOUT
159 DOUBLE PRECISION THRESH
163 INTEGER NSVAL( * ), NVAL( * )
164 DOUBLE PRECISION RWORK( * )
165 COMPLEX*16 AINVP( * ), AP( * ), B( * ), WORK( * ), X( * ),
172 INTEGER NTYPE1, NTYPES
173 PARAMETER ( NTYPE1 = 10, ntypes = 18 )
175 parameter( ntests = 9 )
177 parameter( ntran = 3 )
178 DOUBLE PRECISION ONE, ZERO
179 parameter( one = 1.0d+0, zero = 0.0d+0 )
182 CHARACTER DIAG, NORM, TRANS, UPLO, XTYPE
184 INTEGER I, IDIAG, IMAT, IN, INFO, IRHS, ITRAN, IUPLO,
185 $ k, lap, lda, n, nerrs, nfail, nrhs, nrun
186 DOUBLE PRECISION AINVNM, ANORM, RCOND, RCONDC, RCONDI, RCONDO,
190 CHARACTER TRANSS( NTRAN ), UPLOS( 2 )
191 INTEGER ISEED( 4 ), ISEEDY( 4 )
192 DOUBLE PRECISION RESULT( NTESTS )
196 DOUBLE PRECISION ZLANTP
197 EXTERNAL lsame, zlantp
208 INTEGER INFOT, IOUNIT
211 COMMON / infoc / infot, iounit, ok, lerr
212 COMMON / srnamc / srnamt
218 DATA iseedy / 1988, 1989, 1990, 1991 /
219 DATA uplos /
'U',
'L' / , transs /
'N',
'T',
'C' /
225 path( 1: 1 ) =
'Zomplex precision'
231 iseed( i ) = iseedy( i )
237 $
CALL zerrtr( path, nout )
246 lap = lda*( lda+1 ) / 2
249 DO 70 imat = 1, ntype1
253 IF( .NOT.dotype( imat ) )
260 uplo = uplos( iuplo )
265 CALL zlattp( imat, uplo,
'No transpose', diag, iseed, n,
266 $ ap, x, work, rwork, info )
270 IF( lsame( diag,
'N' ) )
THEN
280 $
CALL zcopy( lap, ap, 1, ainvp, 1 )
282 CALL ztptri( uplo, diag, n, ainvp, info )
287 $
CALL alaerh( path,
'ZTPTRI', info, 0, uplo // diag, n,
288 $ n, -1, -1, -1, imat, nfail, nerrs, nout )
292 anorm = zlantp(
'I', uplo, diag, n, ap, rwork )
293 ainvnm = zlantp(
'I', uplo, diag, n, ainvp, rwork )
294 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
297 rcondi = ( one / anorm ) / ainvnm
303 CALL ztpt01( uplo, diag, n, ap, ainvp, rcondo, rwork,
308 IF( result( 1 ).GE.thresh )
THEN
309 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
310 $
CALL alahd( nout, path )
311 WRITE( nout, fmt = 9999 )uplo, diag, n, imat, 1,
321 DO 30 itran = 1, ntran
325 trans = transs( itran )
326 IF( itran.EQ.1 )
THEN
338 CALL zlarhs( path, xtype, uplo, trans, n, n, 0,
339 $ idiag, nrhs, ap, lap, xact, lda, b,
342 CALL zlacpy(
'Full', n, nrhs, b, lda, x, lda )
345 CALL ztptrs( uplo, trans, diag, n, nrhs, ap, x,
351 $
CALL alaerh( path,
'ZTPTRS', info, 0,
352 $ uplo // trans // diag, n, n, -1,
353 $ -1, -1, imat, nfail, nerrs, nout )
355 CALL ztpt02( uplo, trans, diag, n, nrhs, ap, x,
356 $ lda, b, lda, work, rwork,
362 CALL zget04( n, nrhs, x, lda, xact, lda, rcondc,
370 CALL ztprfs( uplo, trans, diag, n, nrhs, ap, b,
371 $ lda, x, lda, rwork, rwork( nrhs+1 ),
372 $ work, rwork( 2*nrhs+1 ), info )
377 $
CALL alaerh( path,
'ZTPRFS', info, 0,
378 $ uplo // trans // diag, n, n, -1,
379 $ -1, nrhs, imat, nfail, nerrs,
382 CALL zget04( n, nrhs, x, lda, xact, lda, rcondc,
384 CALL ztpt05( uplo, trans, diag, n, nrhs, ap, b,
385 $ lda, x, lda, xact, lda, rwork,
386 $ rwork( nrhs+1 ), result( 5 ) )
392 IF( result( k ).GE.thresh )
THEN
393 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
394 $
CALL alahd( nout, path )
395 WRITE( nout, fmt = 9998 )uplo, trans, diag,
396 $ n, nrhs, imat, k, result( k )
408 IF( itran.EQ.1 )
THEN
416 CALL ztpcon( norm, uplo, diag, n, ap, rcond, work,
422 $
CALL alaerh( path,
'ZTPCON', info, 0,
423 $ norm // uplo // diag, n, n, -1, -1,
424 $ -1, imat, nfail, nerrs, nout )
426 CALL ztpt06( rcond, rcondc, uplo, diag, n, ap, rwork,
431 IF( result( 7 ).GE.thresh )
THEN
432 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
433 $
CALL alahd( nout, path )
434 WRITE( nout, fmt = 9997 )
'ZTPCON', norm, uplo,
435 $ diag, n, imat, 7, result( 7 )
445 DO 100 imat = ntype1 + 1, ntypes
449 IF( .NOT.dotype( imat ) )
456 uplo = uplos( iuplo )
457 DO 80 itran = 1, ntran
461 trans = transs( itran )
466 CALL zlattp( imat, uplo, trans, diag, iseed, n, ap, x,
467 $ work, rwork, info )
473 CALL zcopy( n, x, 1, b, 1 )
474 CALL zlatps( uplo, trans, diag,
'N', n, ap, b, scale,
480 $
CALL alaerh( path,
'ZLATPS', info, 0,
481 $ uplo // trans // diag //
'N', n, n,
482 $ -1, -1, -1, imat, nfail, nerrs, nout )
484 CALL ztpt03( uplo, trans, diag, n, 1, ap, scale,
485 $ rwork, one, b, lda, x, lda, work,
491 CALL zcopy( n, x, 1, b( n+1 ), 1 )
492 CALL zlatps( uplo, trans, diag,
'Y', n, ap, b( n+1 ),
493 $ scale, rwork, info )
498 $
CALL alaerh( path,
'ZLATPS', info, 0,
499 $ uplo // trans // diag //
'Y', n, n,
500 $ -1, -1, -1, imat, nfail, nerrs, nout )
502 CALL ztpt03( uplo, trans, diag, n, 1, ap, scale,
503 $ rwork, one, b( n+1 ), lda, x, lda, work,
509 IF( result( 8 ).GE.thresh )
THEN
510 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
511 $
CALL alahd( nout, path )
512 WRITE( nout, fmt = 9996 )
'ZLATPS', uplo, trans,
513 $ diag,
'N', n, imat, 8, result( 8 )
516 IF( result( 9 ).GE.thresh )
THEN
517 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
518 $
CALL alahd( nout, path )
519 WRITE( nout, fmt = 9996 )
'ZLATPS', uplo, trans,
520 $ diag,
'Y', n, imat, 9, result( 9 )
531 CALL alasum( path, nout, nfail, nrun, nerrs )
533 9999
FORMAT(
' UPLO=''', a1,
''', DIAG=''', a1,
''', N=', i5,
534 $
', type ', i2,
', test(', i2,
')= ', g12.5 )
535 9998
FORMAT(
' UPLO=''', a1,
''', TRANS=''', a1,
''', DIAG=''', a1,
536 $
''', N=', i5,
''', NRHS=', i5,
', type ', i2,
', test(',
538 9997
FORMAT( 1x, a,
'( ''', a1,
''', ''', a1,
''', ''', a1,
''',',
539 $ i5,
', ... ), type ', i2,
', test(', i2,
')=', g12.5 )
540 9996
FORMAT( 1x, a,
'( ''', a1,
''', ''', a1,
''', ''', a1,
''', ''',
541 $ a1,
''',', i5,
', ... ), type ', i2,
', test(', i2,
')=',
subroutine alasum(type, nout, nfail, nrun, nerrs)
ALASUM
subroutine zlarhs(path, xtype, uplo, trans, m, n, kl, ku, nrhs, a, lda, x, ldx, b, ldb, iseed, info)
ZLARHS
subroutine alaerh(path, subnam, info, infoe, opts, m, n, kl, ku, n5, imat, nfail, nerrs, nout)
ALAERH
subroutine alahd(iounit, path)
ALAHD
subroutine zcopy(n, zx, incx, zy, incy)
ZCOPY
subroutine zlacpy(uplo, m, n, a, lda, b, ldb)
ZLACPY copies all or part of one two-dimensional array to another.
subroutine zlatps(uplo, trans, diag, normin, n, ap, x, scale, cnorm, info)
ZLATPS solves a triangular system of equations with the matrix held in packed storage.
subroutine ztpcon(norm, uplo, diag, n, ap, rcond, work, rwork, info)
ZTPCON
subroutine ztprfs(uplo, trans, diag, n, nrhs, ap, b, ldb, x, ldx, ferr, berr, work, rwork, info)
ZTPRFS
subroutine ztptri(uplo, diag, n, ap, info)
ZTPTRI
subroutine ztptrs(uplo, trans, diag, n, nrhs, ap, b, ldb, info)
ZTPTRS
subroutine zchktp(dotype, nn, nval, nns, nsval, thresh, tsterr, nmax, ap, ainvp, b, x, xact, work, rwork, nout)
ZCHKTP
subroutine zerrtr(path, nunit)
ZERRTR
subroutine zget04(n, nrhs, x, ldx, xact, ldxact, rcond, resid)
ZGET04
subroutine zlattp(imat, uplo, trans, diag, iseed, n, ap, b, work, rwork, info)
ZLATTP
subroutine ztpt01(uplo, diag, n, ap, ainvp, rcond, rwork, resid)
ZTPT01
subroutine ztpt02(uplo, trans, diag, n, nrhs, ap, x, ldx, b, ldb, work, rwork, resid)
ZTPT02
subroutine ztpt03(uplo, trans, diag, n, nrhs, ap, scale, cnorm, tscal, x, ldx, b, ldb, work, resid)
ZTPT03
subroutine ztpt05(uplo, trans, diag, n, nrhs, ap, b, ldb, x, ldx, xact, ldxact, ferr, berr, reslts)
ZTPT05
subroutine ztpt06(rcond, rcondc, uplo, diag, n, ap, rwork, rat)
ZTPT06