180 SUBROUTINE dtrsm(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
187 DOUBLE PRECISION ALPHA
189 CHARACTER DIAG,SIDE,TRANSA,UPLO
192 DOUBLE PRECISION A(LDA,*),B(LDB,*)
208 DOUBLE PRECISION TEMP
209 INTEGER I,INFO,J,K,NROWA
210 LOGICAL LSIDE,NOUNIT,UPPER
213 DOUBLE PRECISION ONE,ZERO
214 parameter(one=1.0d+0,zero=0.0d+0)
219 lside = lsame(side,
'L')
225 nounit = lsame(diag,
'N')
226 upper = lsame(uplo,
'U')
229 IF ((.NOT.lside) .AND. (.NOT.lsame(side,
'R')))
THEN
231 ELSE IF ((.NOT.upper) .AND. (.NOT.lsame(uplo,
'L')))
THEN
233 ELSE IF ((.NOT.lsame(transa,
'N')) .AND.
234 + (.NOT.lsame(transa,
'T')) .AND.
235 + (.NOT.lsame(transa,
'C')))
THEN
237 ELSE IF ((.NOT.lsame(diag,
'U')) .AND.
238 + (.NOT.lsame(diag,
'N')))
THEN
240 ELSE IF (m.LT.0)
THEN
242 ELSE IF (n.LT.0)
THEN
244 ELSE IF (lda.LT.max(1,nrowa))
THEN
246 ELSE IF (ldb.LT.max(1,m))
THEN
250 CALL xerbla(
'DTRSM ',info)
256 IF (m.EQ.0 .OR. n.EQ.0)
RETURN
260 IF (alpha.EQ.zero)
THEN
272 IF (lsame(transa,
'N'))
THEN
278 IF (alpha.NE.one)
THEN
280 b(i,j) = alpha*b(i,j)
284 IF (b(k,j).NE.zero)
THEN
285 IF (nounit) b(k,j) = b(k,j)/a(k,k)
287 b(i,j) = b(i,j) - b(k,j)*a(i,k)
294 IF (alpha.NE.one)
THEN
296 b(i,j) = alpha*b(i,j)
300 IF (b(k,j).NE.zero)
THEN
301 IF (nounit) b(k,j) = b(k,j)/a(k,k)
303 b(i,j) = b(i,j) - b(k,j)*a(i,k)
318 temp = temp - a(k,i)*b(k,j)
320 IF (nounit) temp = temp/a(i,i)
329 temp = temp - a(k,i)*b(k,j)
331 IF (nounit) temp = temp/a(i,i)
338 IF (lsame(transa,
'N'))
THEN
344 IF (alpha.NE.one)
THEN
346 b(i,j) = alpha*b(i,j)
350 IF (a(k,j).NE.zero)
THEN
352 b(i,j) = b(i,j) - a(k,j)*b(i,k)
365 IF (alpha.NE.one)
THEN
367 b(i,j) = alpha*b(i,j)
371 IF (a(k,j).NE.zero)
THEN
373 b(i,j) = b(i,j) - a(k,j)*b(i,k)
398 IF (a(j,k).NE.zero)
THEN
401 b(i,j) = b(i,j) - temp*b(i,k)
405 IF (alpha.NE.one)
THEN
407 b(i,k) = alpha*b(i,k)
420 IF (a(j,k).NE.zero)
THEN
423 b(i,j) = b(i,j) - temp*b(i,k)
427 IF (alpha.NE.one)
THEN
429 b(i,k) = alpha*b(i,k)
subroutine xerbla(srname, info)
subroutine dtrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
DTRSM