Solves a symmetric (Hermitian) positive-definite tridiagonal system of linear equations, using the L*D*LH factorization computed by ?pttrf.


call spttrsv(trans, n, nrhs, d, e, b, ldb, info)

call dpttrsv(trans, n, nrhs, d, e, b, ldb, info)

call cpttrsv(uplo, trans, n, nrhs, d, e, b, ldb, info)

call zpttrsv(uplo, trans, n, nrhs, d, e, b, ldb, info)


The ?pttrsv routine solves one of the triangular systems:

LT*X = B, or L*X = B for real flavors,


L*X = B, or LH*X = B,

U*X = B, or UH*X = B for complex flavors,

where L (or U for complex flavors) is the Cholesky factor of a Hermitian positive-definite tridiagonal matrix A such that

A = L*D*LH (computed by spttrf/dpttrf)


A = UH*D*U or A = L*D*LH (computed by cpttrf/zpttrf).

Input Parameters


CHARACTER*1. Must be 'U' or 'L'.

Specifies whether the superdiagonal or the subdiagonal of the tridiagonal matrix A is stored and the form of the factorization:

If uplo = 'U', e is the superdiagonal of U, and A = UH*D*U or A = L*D*LH;

if uplo = 'L', e is the subdiagonal of L, and A = L*D*LH.

The two forms are equivalent, if A is real.



Specifies the form of the system of equations:

for real flavors:

if trans = 'N': L*X = B (no transpose)

if trans = 'T': LT*X = B (transpose)

for complex flavors:

if trans = 'N': U*X = B or L*X = B (no transpose)

if trans = 'C': UH*X = B or LH*X = B (conjugate transpose).


INTEGER. The order of the tridiagonal matrix A. n 0.


INTEGER. The number of right hand sides, that is, the number of columns of the matrix B. nrhs 0.


REAL array of size n. The n diagonal elements of the diagonal matrix D from the factorization computed by ?pttrf.


COMPLEX array of size (n-1). The (n-1) off-diagonal elements of the unit bidiagonal factor U or L from the factorization computed by ?pttrf. See uplo.


COMPLEX array of size ldb by nrhs.

On entry, the right hand side matrix B.



The leading dimension of the array b.

ldb max(1, n).

Output Parameters


On exit, the solution matrix X.



= 0: successful exit

< 0: if info = -i, the i-th argument had an illegal value.

See Also

For more complete information about compiler optimizations, see our Optimization Notice.