LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
subroutine zpttrs ( character  UPLO,
integer  N,
integer  NRHS,
double precision, dimension( * )  D,
complex*16, dimension( * )  E,
complex*16, dimension( ldb, * )  B,
integer  LDB,
integer  INFO 
)

ZPTTRS

Download ZPTTRS + dependencies [TGZ] [ZIP] [TXT]

Purpose:
 ZPTTRS solves a tridiagonal system of the form
    A * X = B
 using the factorization A = U**H *D* U or A = L*D*L**H computed by ZPTTRF.
 D is a diagonal matrix specified in the vector D, U (or L) is a unit
 bidiagonal matrix whose superdiagonal (subdiagonal) is specified in
 the vector E, and X and B are N by NRHS matrices.
Parameters
[in]UPLO
          UPLO is CHARACTER*1
          Specifies the form of the factorization and whether the
          vector E is the superdiagonal of the upper bidiagonal factor
          U or the subdiagonal of the lower bidiagonal factor L.
          = 'U':  A = U**H *D*U, E is the superdiagonal of U
          = 'L':  A = L*D*L**H, E is the subdiagonal of L
[in]N
          N is INTEGER
          The order of the tridiagonal matrix A.  N >= 0.
[in]NRHS
          NRHS is INTEGER
          The number of right hand sides, i.e., the number of columns
          of the matrix B.  NRHS >= 0.
[in]D
          D is DOUBLE PRECISION array, dimension (N)
          The n diagonal elements of the diagonal matrix D from the
          factorization A = U**H *D*U or A = L*D*L**H.
[in]E
          E is COMPLEX*16 array, dimension (N-1)
          If UPLO = 'U', the (n-1) superdiagonal elements of the unit
          bidiagonal factor U from the factorization A = U**H*D*U.
          If UPLO = 'L', the (n-1) subdiagonal elements of the unit
          bidiagonal factor L from the factorization A = L*D*L**H.
[in,out]B
          B is COMPLEX*16 array, dimension (LDB,NRHS)
          On entry, the right hand side vectors B for the system of
          linear equations.
          On exit, the solution vectors, X.
[in]LDB
          LDB is INTEGER
          The leading dimension of the array B.  LDB >= max(1,N).
[out]INFO
          INFO is INTEGER
          = 0: successful exit
          < 0: if INFO = -k, the k-th argument had an illegal value
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
June 2016

Definition at line 123 of file zpttrs.f.

123 *
124 * -- LAPACK computational routine (version 3.6.1) --
125 * -- LAPACK is a software package provided by Univ. of Tennessee, --
126 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
127 * June 2016
128 *
129 * .. Scalar Arguments ..
130  CHARACTER uplo
131  INTEGER info, ldb, n, nrhs
132 * ..
133 * .. Array Arguments ..
134  DOUBLE PRECISION d( * )
135  COMPLEX*16 b( ldb, * ), e( * )
136 * ..
137 *
138 * =====================================================================
139 *
140 * .. Local Scalars ..
141  LOGICAL upper
142  INTEGER iuplo, j, jb, nb
143 * ..
144 * .. External Functions ..
145  INTEGER ilaenv
146  EXTERNAL ilaenv
147 * ..
148 * .. External Subroutines ..
149  EXTERNAL xerbla, zptts2
150 * ..
151 * .. Intrinsic Functions ..
152  INTRINSIC max, min
153 * ..
154 * .. Executable Statements ..
155 *
156 * Test the input arguments.
157 *
158  info = 0
159  upper = ( uplo.EQ.'U' .OR. uplo.EQ.'u' )
160  IF( .NOT.upper .AND. .NOT.( uplo.EQ.'L' .OR. uplo.EQ.'l' ) ) THEN
161  info = -1
162  ELSE IF( n.LT.0 ) THEN
163  info = -2
164  ELSE IF( nrhs.LT.0 ) THEN
165  info = -3
166  ELSE IF( ldb.LT.max( 1, n ) ) THEN
167  info = -7
168  END IF
169  IF( info.NE.0 ) THEN
170  CALL xerbla( 'ZPTTRS', -info )
171  RETURN
172  END IF
173 *
174 * Quick return if possible
175 *
176  IF( n.EQ.0 .OR. nrhs.EQ.0 )
177  $ RETURN
178 *
179 * Determine the number of right-hand sides to solve at a time.
180 *
181  IF( nrhs.EQ.1 ) THEN
182  nb = 1
183  ELSE
184  nb = max( 1, ilaenv( 1, 'ZPTTRS', uplo, n, nrhs, -1, -1 ) )
185  END IF
186 *
187 * Decode UPLO
188 *
189  IF( upper ) THEN
190  iuplo = 1
191  ELSE
192  iuplo = 0
193  END IF
194 *
195  IF( nb.GE.nrhs ) THEN
196  CALL zptts2( iuplo, n, nrhs, d, e, b, ldb )
197  ELSE
198  DO 10 j = 1, nrhs, nb
199  jb = min( nrhs-j+1, nb )
200  CALL zptts2( iuplo, n, jb, d, e, b( 1, j ), ldb )
201  10 CONTINUE
202  END IF
203 *
204  RETURN
205 *
206 * End of ZPTTRS
207 *
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
integer function ilaenv(ISPEC, NAME, OPTS, N1, N2, N3, N4)
Definition: tstiee.f:83
subroutine zptts2(IUPLO, N, NRHS, D, E, B, LDB)
ZPTTS2 solves a tridiagonal system of the form AX=B using the L D LH factorization computed by spttrf...
Definition: zptts2.f:115

Here is the call graph for this function:

Here is the caller graph for this function: