178 SUBROUTINE dtrmm(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
186 DOUBLE PRECISION alpha
188 CHARACTER diag,side,transa,uplo
191 DOUBLE PRECISION a(lda,*),b(ldb,*)
207 DOUBLE PRECISION temp
208 INTEGER i,info,j,k,nrowa
209 LOGICAL lside,nounit,upper
212 DOUBLE PRECISION one,zero
213 parameter(one=1.0d+0,zero=0.0d+0)
218 lside =
lsame(side,
'L')
224 nounit =
lsame(diag,
'N')
225 upper =
lsame(uplo,
'U')
228 IF ((.NOT.lside) .AND. (.NOT.
lsame(side,
'R')))
THEN
230 ELSE IF ((.NOT.upper) .AND. (.NOT.
lsame(uplo,
'L')))
THEN
232 ELSE IF ((.NOT.
lsame(transa,
'N')) .AND.
233 + (.NOT.
lsame(transa,
'T')) .AND.
234 + (.NOT.
lsame(transa,
'C')))
THEN
236 ELSE IF ((.NOT.
lsame(diag,
'U')) .AND. (.NOT.
lsame(diag,
'N')))
THEN
238 ELSE IF (m.LT.0)
THEN
240 ELSE IF (n.LT.0)
THEN
242 ELSE IF (lda.LT.max(1,nrowa))
THEN
244 ELSE IF (ldb.LT.max(1,m))
THEN
248 CALL
xerbla(
'DTRMM ',info)
254 IF (m.EQ.0 .OR. n.EQ.0) return
258 IF (alpha.EQ.zero)
THEN
270 IF (
lsame(transa,
'N'))
THEN
277 IF (b(k,j).NE.zero)
THEN
280 b(i,j) = b(i,j) + temp*a(i,k)
282 IF (nounit) temp = temp*a(k,k)
290 IF (b(k,j).NE.zero)
THEN
293 IF (nounit) b(k,j) = b(k,j)*a(k,k)
295 b(i,j) = b(i,j) + temp*a(i,k)
309 IF (nounit) temp = temp*a(i,i)
311 temp = temp + a(k,i)*b(k,j)
320 IF (nounit) temp = temp*a(i,i)
322 temp = temp + a(k,i)*b(k,j)
330 IF (
lsame(transa,
'N'))
THEN
337 IF (nounit) temp = temp*a(j,j)
342 IF (a(k,j).NE.zero)
THEN
345 b(i,j) = b(i,j) + temp*b(i,k)
353 IF (nounit) temp = temp*a(j,j)
358 IF (a(k,j).NE.zero)
THEN
361 b(i,j) = b(i,j) + temp*b(i,k)
374 IF (a(j,k).NE.zero)
THEN
377 b(i,j) = b(i,j) + temp*b(i,k)
382 IF (nounit) temp = temp*a(k,k)
383 IF (temp.NE.one)
THEN
392 IF (a(j,k).NE.zero)
THEN
395 b(i,j) = b(i,j) + temp*b(i,k)
400 IF (nounit) temp = temp*a(k,k)
401 IF (temp.NE.one)
THEN