293 SUBROUTINE cgtsvx( FACT, TRANS, N, NRHS, DL, D, DU, DLF, DF, DUF,
294 $ du2, ipiv, b, ldb, x, ldx, rcond, ferr, berr,
295 $ work, rwork, info )
303 CHARACTER fact, trans
304 INTEGER info, ldb, ldx, n, nrhs
309 REAL berr( * ), ferr( * ), rwork( * )
310 COMPLEX b( ldb, * ), d( * ), df( * ), dl( * ),
311 $ dlf( * ), du( * ), du2( * ), duf( * ),
312 $ work( * ), x( ldx, * )
319 parameter( zero = 0.0e+0 )
322 LOGICAL nofact, notran
341 nofact =
lsame( fact,
'N' )
342 notran =
lsame( trans,
'N' )
343 IF( .NOT.nofact .AND. .NOT.
lsame( fact,
'F' ) )
THEN
345 ELSE IF( .NOT.notran .AND. .NOT.
lsame( trans,
'T' ) .AND. .NOT.
346 $
lsame( trans,
'C' ) )
THEN
348 ELSE IF( n.LT.0 )
THEN
350 ELSE IF( nrhs.LT.0 )
THEN
352 ELSE IF( ldb.LT.max( 1, n ) )
THEN
354 ELSE IF( ldx.LT.max( 1, n ) )
THEN
358 CALL
xerbla(
'CGTSVX', -info )
366 CALL
ccopy( n, d, 1, df, 1 )
368 CALL
ccopy( n-1, dl, 1, dlf, 1 )
369 CALL
ccopy( n-1, du, 1, duf, 1 )
371 CALL
cgttrf( n, dlf, df, duf, du2, ipiv, info )
388 anorm =
clangt( norm, n, dl, d, du )
392 CALL
cgtcon( norm, n, dlf, df, duf, du2, ipiv, anorm, rcond, work,
397 CALL
clacpy(
'Full', n, nrhs, b, ldb, x, ldx )
398 CALL
cgttrs( trans, n, nrhs, dlf, df, duf, du2, ipiv, x, ldx,
404 CALL
cgtrfs( trans, n, nrhs, dl, d, du, dlf, df, duf, du2, ipiv,
405 $ b, ldb, x, ldx, ferr, berr, work, rwork, info )
409 IF( rcond.LT.
slamch(
'Epsilon' ) )