182 SUBROUTINE strsm(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
192 CHARACTER diag,side,transa,uplo
195 REAL a(lda,*),b(ldb,*)
212 INTEGER i,info,j,k,nrowa
213 LOGICAL lside,nounit,upper
217 parameter(one=1.0e+0,zero=0.0e+0)
222 lside =
lsame(side,
'L')
228 nounit =
lsame(diag,
'N')
229 upper =
lsame(uplo,
'U')
232 IF ((.NOT.lside) .AND. (.NOT.
lsame(side,
'R')))
THEN
234 ELSE IF ((.NOT.upper) .AND. (.NOT.
lsame(uplo,
'L')))
THEN
236 ELSE IF ((.NOT.
lsame(transa,
'N')) .AND.
237 + (.NOT.
lsame(transa,
'T')) .AND.
238 + (.NOT.
lsame(transa,
'C')))
THEN
240 ELSE IF ((.NOT.
lsame(diag,
'U')) .AND. (.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(
'STRSM ',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)
320 temp = temp - a(k,i)*b(k,j)
322 IF (nounit) temp = temp/a(i,i)
331 temp = temp - a(k,i)*b(k,j)
333 IF (nounit) temp = temp/a(i,i)
340 IF (
lsame(transa,
'N'))
THEN
346 IF (alpha.NE.one)
THEN
348 b(i,j) = alpha*b(i,j)
352 IF (a(k,j).NE.zero)
THEN
354 b(i,j) = b(i,j) - a(k,j)*b(i,k)
367 IF (alpha.NE.one)
THEN
369 b(i,j) = alpha*b(i,j)
373 IF (a(k,j).NE.zero)
THEN
375 b(i,j) = b(i,j) - a(k,j)*b(i,k)
400 IF (a(j,k).NE.zero)
THEN
403 b(i,j) = b(i,j) - temp*b(i,k)
407 IF (alpha.NE.one)
THEN
409 b(i,k) = alpha*b(i,k)
422 IF (a(j,k).NE.zero)
THEN
425 b(i,j) = b(i,j) - temp*b(i,k)
429 IF (alpha.NE.one)
THEN
431 b(i,k) = alpha*b(i,k)