LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
subroutine spttrs ( integer  N,
integer  NRHS,
real, dimension( * )  D,
real, dimension( * )  E,
real, dimension( ldb, * )  B,
integer  LDB,
integer  INFO 
)

SPTTRS

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

Purpose:
 SPTTRS solves a tridiagonal system of the form
    A * X = B
 using the L*D*L**T factorization of A computed by SPTTRF.  D is a
 diagonal matrix specified in the vector D, L is a unit bidiagonal
 matrix whose subdiagonal is specified in the vector E, and X and B
 are N by NRHS matrices.
Parameters
[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 REAL array, dimension (N)
          The n diagonal elements of the diagonal matrix D from the
          L*D*L**T factorization of A.
[in]E
          E is REAL array, dimension (N-1)
          The (n-1) subdiagonal elements of the unit bidiagonal factor
          L from the L*D*L**T factorization of A.  E can also be regarded
          as the superdiagonal of the unit bidiagonal factor U from the
          factorization A = U**T*D*U.
[in,out]B
          B is REAL 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
September 2012

Definition at line 111 of file spttrs.f.

111 *
112 * -- LAPACK computational routine (version 3.4.2) --
113 * -- LAPACK is a software package provided by Univ. of Tennessee, --
114 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
115 * September 2012
116 *
117 * .. Scalar Arguments ..
118  INTEGER info, ldb, n, nrhs
119 * ..
120 * .. Array Arguments ..
121  REAL b( ldb, * ), d( * ), e( * )
122 * ..
123 *
124 * =====================================================================
125 *
126 * .. Local Scalars ..
127  INTEGER j, jb, nb
128 * ..
129 * .. External Functions ..
130  INTEGER ilaenv
131  EXTERNAL ilaenv
132 * ..
133 * .. External Subroutines ..
134  EXTERNAL sptts2, xerbla
135 * ..
136 * .. Intrinsic Functions ..
137  INTRINSIC max, min
138 * ..
139 * .. Executable Statements ..
140 *
141 * Test the input arguments.
142 *
143  info = 0
144  IF( n.LT.0 ) THEN
145  info = -1
146  ELSE IF( nrhs.LT.0 ) THEN
147  info = -2
148  ELSE IF( ldb.LT.max( 1, n ) ) THEN
149  info = -6
150  END IF
151  IF( info.NE.0 ) THEN
152  CALL xerbla( 'SPTTRS', -info )
153  RETURN
154  END IF
155 *
156 * Quick return if possible
157 *
158  IF( n.EQ.0 .OR. nrhs.EQ.0 )
159  $ RETURN
160 *
161 * Determine the number of right-hand sides to solve at a time.
162 *
163  IF( nrhs.EQ.1 ) THEN
164  nb = 1
165  ELSE
166  nb = max( 1, ilaenv( 1, 'SPTTRS', ' ', n, nrhs, -1, -1 ) )
167  END IF
168 *
169  IF( nb.GE.nrhs ) THEN
170  CALL sptts2( n, nrhs, d, e, b, ldb )
171  ELSE
172  DO 10 j = 1, nrhs, nb
173  jb = min( nrhs-j+1, nb )
174  CALL sptts2( n, jb, d, e, b( 1, j ), ldb )
175  10 CONTINUE
176  END IF
177 *
178  RETURN
179 *
180 * End of SPTTRS
181 *
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
integer function ilaenv(ISPEC, NAME, OPTS, N1, N2, N3, N4)
Definition: tstiee.f:83
subroutine sptts2(N, NRHS, D, E, B, LDB)
SPTTS2 solves a tridiagonal system of the form AX=B using the L D LH factorization computed by spttrf...
Definition: sptts2.f:104

Here is the call graph for this function:

Here is the caller graph for this function: