1 SUBROUTINE dtrsm ( SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA,
4 CHARACTER*1 SIDE, UPLO, TRANSA, DIAG
8 DOUBLE PRECISION A( LDA, * ), B( LDB, * )
138 LOGICAL LSIDE, NOUNIT, UPPER
139 INTEGER I, INFO, J, K, NROWA
140 DOUBLE PRECISION TEMP
142 DOUBLE PRECISION ONE , ZERO
143 parameter( one = 1.0d+0, zero = 0.0d+0 )
149 lside = lsame( side ,
'L' )
155 nounit = lsame( diag ,
'N' )
156 upper = lsame( uplo ,
'U' )
159 IF( ( .NOT.lside ).AND.
160 $ ( .NOT.lsame( side ,
'R' ) ) )
THEN
162 ELSE IF( ( .NOT.upper ).AND.
163 $ ( .NOT.lsame( uplo ,
'L' ) ) )
THEN
165 ELSE IF( ( .NOT.lsame( transa,
'N' ) ).AND.
166 $ ( .NOT.lsame( transa,
'T' ) ).AND.
167 $ ( .NOT.lsame( transa,
'C' ) ) )
THEN
169 ELSE IF( ( .NOT.lsame( diag ,
'U' ) ).AND.
170 $ ( .NOT.lsame( diag ,
'N' ) ) )
THEN
172 ELSE IF( m .LT.0 )
THEN
174 ELSE IF( n .LT.0 )
THEN
176 ELSE IF( lda.LT.max( 1, nrowa ) )
THEN
178 ELSE IF( ldb.LT.max( 1, m ) )
THEN
182 CALL xerbla(
'DTRSM ', info )
193 IF( alpha.EQ.zero )
THEN
205 IF( lsame( transa,
'N' ) )
THEN
211 IF( alpha.NE.one )
THEN
213 b( i, j ) = alpha*b( i, j )
217 IF( b( k, j ).NE.zero )
THEN
219 $ b( k, j ) = b( k, j )/a( k, k )
221 b( i, j ) = b( i, j ) - b( k, j )*a( i, k )
228 IF( alpha.NE.one )
THEN
230 b( i, j ) = alpha*b( i, j )
234 IF( b( k, j ).NE.zero )
THEN
236 $ b( k, j ) = b( k, j )/a( k, k )
238 b( i, j ) = b( i, j ) - b( k, j )*a( i, k )
251 temp = alpha*b( i, j )
253 temp = temp - a( k, i )*b( k, j )
256 $ temp = temp/a( i, i )
263 temp = alpha*b( i, j )
265 temp = temp - a( k, i )*b( k, j )
268 $ temp = temp/a( i, i )
275 IF( lsame( transa,
'N' ) )
THEN
281 IF( alpha.NE.one )
THEN
283 b( i, j ) = alpha*b( i, j )
287 IF( a( k, j ).NE.zero )
THEN
289 b( i, j ) = b( i, j ) - a( k, j )*b( i, k )
296 b( i, j ) = temp*b( i, j )
302 IF( alpha.NE.one )
THEN
304 b( i, j ) = alpha*b( i, j )
308 IF( a( k, j ).NE.zero )
THEN
310 b( i, j ) = b( i, j ) - a( k, j )*b( i, k )
317 b( i, j ) = temp*b( i, j )
331 b( i, k ) = temp*b( i, k )
335 IF( a( j, k ).NE.zero )
THEN
338 b( i, j ) = b( i, j ) - temp*b( i, k )
342 IF( alpha.NE.one )
THEN
344 b( i, k ) = alpha*b( i, k )
353 b( i, k ) = temp*b( i, k )
357 IF( a( j, k ).NE.zero )
THEN
360 b( i, j ) = b( i, j ) - temp*b( i, k )
364 IF( alpha.NE.one )
THEN
366 b( i, k ) = alpha*b( i, k )
subroutine dtrsm(SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)
subroutine xerbla(SRNAME, INFO)