181 SUBROUTINE ctrsm(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
191 CHARACTER diag,side,transa,uplo
194 COMPLEX a(lda,*),b(ldb,*)
211 INTEGER i,info,j,k,nrowa
212 LOGICAL lside,noconj,nounit,upper
216 parameter(one= (1.0e+0,0.0e+0))
218 parameter(zero= (0.0e+0,0.0e+0))
223 lside =
lsame(side,
'L')
229 noconj =
lsame(transa,
'T')
230 nounit =
lsame(diag,
'N')
231 upper =
lsame(uplo,
'U')
234 IF ((.NOT.lside) .AND. (.NOT.
lsame(side,
'R')))
THEN
236 ELSE IF ((.NOT.upper) .AND. (.NOT.
lsame(uplo,
'L')))
THEN
238 ELSE IF ((.NOT.
lsame(transa,
'N')) .AND.
239 + (.NOT.
lsame(transa,
'T')) .AND.
240 + (.NOT.
lsame(transa,
'C')))
THEN
242 ELSE IF ((.NOT.
lsame(diag,
'U')) .AND. (.NOT.
lsame(diag,
'N')))
THEN
244 ELSE IF (m.LT.0)
THEN
246 ELSE IF (n.LT.0)
THEN
248 ELSE IF (lda.LT.max(1,nrowa))
THEN
250 ELSE IF (ldb.LT.max(1,m))
THEN
254 CALL
xerbla(
'CTRSM ',info)
260 IF (m.EQ.0 .OR. n.EQ.0) return
264 IF (alpha.EQ.zero)
THEN
276 IF (
lsame(transa,
'N'))
THEN
282 IF (alpha.NE.one)
THEN
284 b(i,j) = alpha*b(i,j)
288 IF (b(k,j).NE.zero)
THEN
289 IF (nounit) b(k,j) = b(k,j)/a(k,k)
291 b(i,j) = b(i,j) - b(k,j)*a(i,k)
298 IF (alpha.NE.one)
THEN
300 b(i,j) = alpha*b(i,j)
304 IF (b(k,j).NE.zero)
THEN
305 IF (nounit) b(k,j) = b(k,j)/a(k,k)
307 b(i,j) = b(i,j) - b(k,j)*a(i,k)
324 temp = temp - a(k,i)*b(k,j)
326 IF (nounit) temp = temp/a(i,i)
329 temp = temp - conjg(a(k,i))*b(k,j)
331 IF (nounit) temp = temp/conjg(a(i,i))
342 temp = temp - a(k,i)*b(k,j)
344 IF (nounit) temp = temp/a(i,i)
347 temp = temp - conjg(a(k,i))*b(k,j)
349 IF (nounit) temp = temp/conjg(a(i,i))
357 IF (
lsame(transa,
'N'))
THEN
363 IF (alpha.NE.one)
THEN
365 b(i,j) = alpha*b(i,j)
369 IF (a(k,j).NE.zero)
THEN
371 b(i,j) = b(i,j) - a(k,j)*b(i,k)
384 IF (alpha.NE.one)
THEN
386 b(i,j) = alpha*b(i,j)
390 IF (a(k,j).NE.zero)
THEN
392 b(i,j) = b(i,j) - a(k,j)*b(i,k)
415 temp = one/conjg(a(k,k))
422 IF (a(j,k).NE.zero)
THEN
429 b(i,j) = b(i,j) - temp*b(i,k)
433 IF (alpha.NE.one)
THEN
435 b(i,k) = alpha*b(i,k)
445 temp = one/conjg(a(k,k))
452 IF (a(j,k).NE.zero)
THEN
459 b(i,j) = b(i,j) - temp*b(i,k)
463 IF (alpha.NE.one)
THEN
465 b(i,k) = alpha*b(i,k)