LAPACK  3.6.1 LAPACK: Linear Algebra PACKage
 subroutine dtrtrs ( character UPLO, character TRANS, character DIAG, integer N, integer NRHS, double precision, dimension( lda, * ) A, integer LDA, double precision, dimension( ldb, * ) B, integer LDB, integer INFO )

DTRTRS

Purpose:
``` DTRTRS solves a triangular system of the form

A * X = B  or  A**T * X = B,

where A is a triangular matrix of order N, and B is an N-by-NRHS
matrix.  A check is made to verify that A is nonsingular.```
Parameters
 [in] UPLO ``` UPLO is CHARACTER*1 = 'U': A is upper triangular; = 'L': A is lower triangular.``` [in] TRANS ``` TRANS is CHARACTER*1 Specifies the form of the system of equations: = 'N': A * X = B (No transpose) = 'T': A**T * X = B (Transpose) = 'C': A**H * X = B (Conjugate transpose = Transpose)``` [in] DIAG ``` DIAG is CHARACTER*1 = 'N': A is non-unit triangular; = 'U': A is unit triangular.``` [in] N ``` N is INTEGER The order of the 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] A ``` A is DOUBLE PRECISION array, dimension (LDA,N) The triangular matrix A. If UPLO = 'U', the leading N-by-N upper triangular part of the array A contains the upper triangular matrix, and the strictly lower triangular part of A is not referenced. If UPLO = 'L', the leading N-by-N lower triangular part of the array A contains the lower triangular matrix, and the strictly upper triangular part of A is not referenced. If DIAG = 'U', the diagonal elements of A are also not referenced and are assumed to be 1.``` [in] LDA ``` LDA is INTEGER The leading dimension of the array A. LDA >= max(1,N).``` [in,out] B ``` B is DOUBLE PRECISION array, dimension (LDB,NRHS) On entry, the right hand side matrix B. On exit, if INFO = 0, the solution matrix 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 = -i, the i-th argument had an illegal value > 0: if INFO = i, the i-th diagonal element of A is zero, indicating that the matrix is singular and the solutions X have not been computed.```
Date
November 2011

Definition at line 142 of file dtrtrs.f.

142 *
143 * -- LAPACK computational routine (version 3.4.0) --
144 * -- LAPACK is a software package provided by Univ. of Tennessee, --
145 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
146 * November 2011
147 *
148 * .. Scalar Arguments ..
149  CHARACTER diag, trans, uplo
150  INTEGER info, lda, ldb, n, nrhs
151 * ..
152 * .. Array Arguments ..
153  DOUBLE PRECISION a( lda, * ), b( ldb, * )
154 * ..
155 *
156 * =====================================================================
157 *
158 * .. Parameters ..
159  DOUBLE PRECISION zero, one
160  parameter ( zero = 0.0d+0, one = 1.0d+0 )
161 * ..
162 * .. Local Scalars ..
163  LOGICAL nounit
164 * ..
165 * .. External Functions ..
166  LOGICAL lsame
167  EXTERNAL lsame
168 * ..
169 * .. External Subroutines ..
170  EXTERNAL dtrsm, xerbla
171 * ..
172 * .. Intrinsic Functions ..
173  INTRINSIC max
174 * ..
175 * .. Executable Statements ..
176 *
177 * Test the input parameters.
178 *
179  info = 0
180  nounit = lsame( diag, 'N' )
181  IF( .NOT.lsame( uplo, 'U' ) .AND. .NOT.lsame( uplo, 'L' ) ) THEN
182  info = -1
183  ELSE IF( .NOT.lsame( trans, 'N' ) .AND. .NOT.
184  \$ lsame( trans, 'T' ) .AND. .NOT.lsame( trans, 'C' ) ) THEN
185  info = -2
186  ELSE IF( .NOT.nounit .AND. .NOT.lsame( diag, 'U' ) ) THEN
187  info = -3
188  ELSE IF( n.LT.0 ) THEN
189  info = -4
190  ELSE IF( nrhs.LT.0 ) THEN
191  info = -5
192  ELSE IF( lda.LT.max( 1, n ) ) THEN
193  info = -7
194  ELSE IF( ldb.LT.max( 1, n ) ) THEN
195  info = -9
196  END IF
197  IF( info.NE.0 ) THEN
198  CALL xerbla( 'DTRTRS', -info )
199  RETURN
200  END IF
201 *
202 * Quick return if possible
203 *
204  IF( n.EQ.0 )
205  \$ RETURN
206 *
207 * Check for singularity.
208 *
209  IF( nounit ) THEN
210  DO 10 info = 1, n
211  IF( a( info, info ).EQ.zero )
212  \$ RETURN
213  10 CONTINUE
214  END IF
215  info = 0
216 *
217 * Solve A * x = b or A**T * x = b.
218 *
219  CALL dtrsm( 'Left', uplo, trans, diag, n, nrhs, one, a, lda, b,
220  \$ ldb )
221 *
222  RETURN
223 *
224 * End of DTRTRS
225 *
subroutine dtrsm(SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)
DTRSM
Definition: dtrsm.f:183
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55

Here is the call graph for this function:

Here is the caller graph for this function: