190 SUBROUTINE chemm(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
198 INTEGER LDA,LDB,LDC,M,N
202 COMPLEX A(LDA,*),B(LDB,*),C(LDC,*)
215 INTRINSIC conjg,max,real
219 INTEGER I,INFO,J,K,NROWA
224 parameter(one= (1.0e+0,0.0e+0))
226 parameter(zero= (0.0e+0,0.0e+0))
231 IF (lsame(side,
'L'))
THEN
236 upper = lsame(uplo,
'U')
241 IF ((.NOT.lsame(side,
'L')) .AND.
242 + (.NOT.lsame(side,
'R')))
THEN
244 ELSE IF ((.NOT.upper) .AND.
245 + (.NOT.lsame(uplo,
'L')))
THEN
247 ELSE IF (m.LT.0)
THEN
249 ELSE IF (n.LT.0)
THEN
251 ELSE IF (lda.LT.max(1,nrowa))
THEN
253 ELSE IF (ldb.LT.max(1,m))
THEN
255 ELSE IF (ldc.LT.max(1,m))
THEN
259 CALL xerbla(
'CHEMM ',info)
265 IF ((m.EQ.0) .OR. (n.EQ.0) .OR.
266 + ((alpha.EQ.zero).AND. (beta.EQ.one)))
RETURN
270 IF (alpha.EQ.zero)
THEN
271 IF (beta.EQ.zero)
THEN
289 IF (lsame(side,
'L'))
THEN
299 c(k,j) = c(k,j) + temp1*a(k,i)
300 temp2 = temp2 + b(k,j)*conjg(a(k,i))
302 IF (beta.EQ.zero)
THEN
303 c(i,j) = temp1*real(a(i,i)) + alpha*temp2
305 c(i,j) = beta*c(i,j) + temp1*real(a(i,i)) +
316 c(k,j) = c(k,j) + temp1*a(k,i)
317 temp2 = temp2 + b(k,j)*conjg(a(k,i))
319 IF (beta.EQ.zero)
THEN
320 c(i,j) = temp1*real(a(i,i)) + alpha*temp2
322 c(i,j) = beta*c(i,j) + temp1*real(a(i,i)) +
333 temp1 = alpha*real(a(j,j))
334 IF (beta.EQ.zero)
THEN
336 c(i,j) = temp1*b(i,j)
340 c(i,j) = beta*c(i,j) + temp1*b(i,j)
347 temp1 = alpha*conjg(a(j,k))
350 c(i,j) = c(i,j) + temp1*b(i,k)
355 temp1 = alpha*conjg(a(j,k))
360 c(i,j) = c(i,j) + temp1*b(i,k)
subroutine xerbla(srname, info)
subroutine chemm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc)
CHEMM