150 SUBROUTINE zchktp( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
151 $ nmax, ap, ainvp, b, x, xact, work, rwork,
161 INTEGER nmax, nn, nns, nout
162 DOUBLE PRECISION thresh
166 INTEGER nsval( * ), nval( * )
167 DOUBLE PRECISION rwork( * )
168 COMPLEX*16 ainvp( * ), ap( * ), b( * ), work( * ), x( * ),
175 INTEGER ntype1, ntypes
176 parameter( ntype1 = 10, ntypes = 18 )
178 parameter( ntests = 9 )
180 parameter( ntran = 3 )
181 DOUBLE PRECISION one, zero
182 parameter( one = 1.0d+0, zero = 0.0d+0 )
185 CHARACTER diag, norm, trans, uplo, xtype
187 INTEGER i, idiag, imat, in, info, irhs, itran, iuplo,
188 $ k, lap, lda, n, nerrs, nfail, nrhs, nrun
189 DOUBLE PRECISION ainvnm, anorm, rcond, rcondc, rcondi, rcondo,
193 CHARACTER transs( ntran ), uplos( 2 )
194 INTEGER iseed( 4 ), iseedy( 4 )
195 DOUBLE PRECISION result( ntests )
211 INTEGER infot, iounit
214 common / infoc / infot, iounit, ok, lerr
215 common / srnamc / srnamt
221 DATA iseedy / 1988, 1989, 1990, 1991 /
222 DATA uplos /
'U',
'L' / , transs /
'N',
'T',
'C' /
228 path( 1: 1 ) =
'Zomplex precision'
234 iseed( i ) = iseedy( i )
240 $ CALL
zerrtr( path, nout )
249 lap = lda*( lda+1 ) / 2
252 DO 70 imat = 1, ntype1
256 IF( .NOT.dotype( imat ) )
263 uplo = uplos( iuplo )
268 CALL
zlattp( imat, uplo,
'No transpose', diag, iseed, n,
269 $ ap, x, work, rwork, info )
273 IF(
lsame( diag,
'N' ) )
THEN
283 $ CALL
zcopy( lap, ap, 1, ainvp, 1 )
285 CALL
ztptri( uplo, diag, n, ainvp, info )
290 $ CALL
alaerh( path,
'ZTPTRI', info, 0, uplo // diag, n,
291 $ n, -1, -1, -1, imat, nfail, nerrs, nout )
295 anorm =
zlantp(
'I', uplo, diag, n, ap, rwork )
296 ainvnm =
zlantp(
'I', uplo, diag, n, ainvp, rwork )
297 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
300 rcondi = ( one / anorm ) / ainvnm
306 CALL
ztpt01( uplo, diag, n, ap, ainvp, rcondo, rwork,
311 IF( result( 1 ).GE.thresh )
THEN
312 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
313 $ CALL
alahd( nout, path )
314 WRITE( nout, fmt = 9999 )uplo, diag, n, imat, 1,
324 DO 30 itran = 1, ntran
328 trans = transs( itran )
329 IF( itran.EQ.1 )
THEN
341 CALL
zlarhs( path, xtype, uplo, trans, n, n, 0,
342 $ idiag, nrhs, ap, lap, xact, lda, b,
345 CALL
zlacpy(
'Full', n, nrhs, b, lda, x, lda )
348 CALL
ztptrs( uplo, trans, diag, n, nrhs, ap, x,
354 $ CALL
alaerh( path,
'ZTPTRS', info, 0,
355 $ uplo // trans // diag, n, n, -1,
356 $ -1, -1, imat, nfail, nerrs, nout )
358 CALL
ztpt02( uplo, trans, diag, n, nrhs, ap, x,
359 $ lda, b, lda, work, rwork,
365 CALL
zget04( n, nrhs, x, lda, xact, lda, rcondc,
373 CALL
ztprfs( uplo, trans, diag, n, nrhs, ap, b,
374 $ lda, x, lda, rwork, rwork( nrhs+1 ),
375 $ work, rwork( 2*nrhs+1 ), info )
380 $ CALL
alaerh( path,
'ZTPRFS', info, 0,
381 $ uplo // trans // diag, n, n, -1,
382 $ -1, nrhs, imat, nfail, nerrs,
385 CALL
zget04( n, nrhs, x, lda, xact, lda, rcondc,
387 CALL
ztpt05( uplo, trans, diag, n, nrhs, ap, b,
388 $ lda, x, lda, xact, lda, rwork,
389 $ rwork( nrhs+1 ), result( 5 ) )
395 IF( result( k ).GE.thresh )
THEN
396 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
397 $ CALL
alahd( nout, path )
398 WRITE( nout, fmt = 9998 )uplo, trans, diag,
399 $ n, nrhs, imat, k, result( k )
411 IF( itran.EQ.1 )
THEN
419 CALL
ztpcon( norm, uplo, diag, n, ap, rcond, work,
425 $ CALL
alaerh( path,
'ZTPCON', info, 0,
426 $ norm // uplo // diag, n, n, -1, -1,
427 $ -1, imat, nfail, nerrs, nout )
429 CALL
ztpt06( rcond, rcondc, uplo, diag, n, ap, rwork,
434 IF( result( 7 ).GE.thresh )
THEN
435 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
436 $ CALL
alahd( nout, path )
437 WRITE( nout, fmt = 9997 )
'ZTPCON', norm, uplo,
438 $ diag, n, imat, 7, result( 7 )
448 DO 100 imat = ntype1 + 1, ntypes
452 IF( .NOT.dotype( imat ) )
459 uplo = uplos( iuplo )
460 DO 80 itran = 1, ntran
464 trans = transs( itran )
469 CALL
zlattp( imat, uplo, trans, diag, iseed, n, ap, x,
470 $ work, rwork, info )
476 CALL
zcopy( n, x, 1, b, 1 )
477 CALL
zlatps( uplo, trans, diag,
'N', n, ap, b, scale,
483 $ CALL
alaerh( path,
'ZLATPS', info, 0,
484 $ uplo // trans // diag //
'N', n, n,
485 $ -1, -1, -1, imat, nfail, nerrs, nout )
487 CALL
ztpt03( uplo, trans, diag, n, 1, ap, scale,
488 $ rwork, one, b, lda, x, lda, work,
494 CALL
zcopy( n, x, 1, b( n+1 ), 1 )
495 CALL
zlatps( uplo, trans, diag,
'Y', n, ap, b( n+1 ),
496 $ scale, rwork, info )
501 $ CALL
alaerh( path,
'ZLATPS', info, 0,
502 $ uplo // trans // diag //
'Y', n, n,
503 $ -1, -1, -1, imat, nfail, nerrs, nout )
505 CALL
ztpt03( uplo, trans, diag, n, 1, ap, scale,
506 $ rwork, one, b( n+1 ), lda, x, lda, work,
512 IF( result( 8 ).GE.thresh )
THEN
513 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
514 $ CALL
alahd( nout, path )
515 WRITE( nout, fmt = 9996 )
'ZLATPS', uplo, trans,
516 $ diag,
'N', n, imat, 8, result( 8 )
519 IF( result( 9 ).GE.thresh )
THEN
520 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
521 $ CALL
alahd( nout, path )
522 WRITE( nout, fmt = 9996 )
'ZLATPS', uplo, trans,
523 $ diag,
'Y', n, imat, 9, result( 9 )
534 CALL
alasum( path, nout, nfail, nrun, nerrs )
536 9999 format(
' UPLO=''', a1,
''', DIAG=''', a1,
''', N=', i5,
537 $
', type ', i2,
', test(', i2,
')= ', g12.5 )
538 9998 format(
' UPLO=''', a1,
''', TRANS=''', a1,
''', DIAG=''', a1,
539 $
''', N=', i5,
''', NRHS=', i5,
', type ', i2,
', test(',
541 9997 format( 1x, a,
'( ''', a1,
''', ''', a1,
''', ''', a1,
''',',
542 $ i5,
', ... ), type ', i2,
', test(', i2,
')=', g12.5 )
543 9996 format( 1x, a,
'( ''', a1,
''', ''', a1,
''', ''', a1,
''', ''',
544 $ a1,
''',', i5,
', ... ), type ', i2,
', test(', i2,
')=',