179 SUBROUTINE ztrsm(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
188 CHARACTER DIAG,SIDE,TRANSA,UPLO
191 COMPLEX*16 A(LDA,*),B(LDB,*)
208 INTEGER I,INFO,J,K,NROWA
209 LOGICAL LSIDE,NOCONJ,NOUNIT,UPPER
213 parameter(one= (1.0d+0,0.0d+0))
215 parameter(zero= (0.0d+0,0.0d+0))
220 lside = lsame(side,
'L')
226 noconj = lsame(transa,
'T')
227 nounit = lsame(diag,
'N')
228 upper = lsame(uplo,
'U')
231 IF ((.NOT.lside) .AND. (.NOT.lsame(side,
'R')))
THEN
233 ELSE IF ((.NOT.upper) .AND. (.NOT.lsame(uplo,
'L')))
THEN
235 ELSE IF ((.NOT.lsame(transa,
'N')) .AND.
236 + (.NOT.lsame(transa,
'T')) .AND.
237 + (.NOT.lsame(transa,
'C')))
THEN
239 ELSE IF ((.NOT.lsame(diag,
'U')) .AND.
240 + (.NOT.lsame(diag,
'N')))
THEN
242 ELSE IF (m.LT.0)
THEN
244 ELSE IF (n.LT.0)
THEN
246 ELSE IF (lda.LT.max(1,nrowa))
THEN
248 ELSE IF (ldb.LT.max(1,m))
THEN
252 CALL xerbla(
'ZTRSM ',info)
258 IF (m.EQ.0 .OR. n.EQ.0)
RETURN
262 IF (alpha.EQ.zero)
THEN
274 IF (lsame(transa,
'N'))
THEN
280 IF (alpha.NE.one)
THEN
282 b(i,j) = alpha*b(i,j)
286 IF (b(k,j).NE.zero)
THEN
287 IF (nounit) b(k,j) = b(k,j)/a(k,k)
289 b(i,j) = b(i,j) - b(k,j)*a(i,k)
296 IF (alpha.NE.one)
THEN
298 b(i,j) = alpha*b(i,j)
302 IF (b(k,j).NE.zero)
THEN
303 IF (nounit) b(k,j) = b(k,j)/a(k,k)
305 b(i,j) = b(i,j) - b(k,j)*a(i,k)
322 temp = temp - a(k,i)*b(k,j)
324 IF (nounit) temp = temp/a(i,i)
327 temp = temp - dconjg(a(k,i))*b(k,j)
329 IF (nounit) temp = temp/dconjg(a(i,i))
340 temp = temp - a(k,i)*b(k,j)
342 IF (nounit) temp = temp/a(i,i)
345 temp = temp - dconjg(a(k,i))*b(k,j)
347 IF (nounit) temp = temp/dconjg(a(i,i))
355 IF (lsame(transa,
'N'))
THEN
361 IF (alpha.NE.one)
THEN
363 b(i,j) = alpha*b(i,j)
367 IF (a(k,j).NE.zero)
THEN
369 b(i,j) = b(i,j) - a(k,j)*b(i,k)
382 IF (alpha.NE.one)
THEN
384 b(i,j) = alpha*b(i,j)
388 IF (a(k,j).NE.zero)
THEN
390 b(i,j) = b(i,j) - a(k,j)*b(i,k)
413 temp = one/dconjg(a(k,k))
420 IF (a(j,k).NE.zero)
THEN
424 temp = dconjg(a(j,k))
427 b(i,j) = b(i,j) - temp*b(i,k)
431 IF (alpha.NE.one)
THEN
433 b(i,k) = alpha*b(i,k)
443 temp = one/dconjg(a(k,k))
450 IF (a(j,k).NE.zero)
THEN
454 temp = dconjg(a(j,k))
457 b(i,j) = b(i,j) - temp*b(i,k)
461 IF (alpha.NE.one)
THEN
463 b(i,k) = alpha*b(i,k)
subroutine xerbla(srname, info)
subroutine ztrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
ZTRSM