1 SUBROUTINE cmmtadd( M, N, ALPHA, A, LDA, BETA, B, LDB )
13 COMPLEX A( LDA, * ), B( LDB, * )
70 parameter( one = ( 1.0e+0, 0.0e+0 ),
71 $ zero = ( 0.0e+0, 0.0e+0 ) )
77 EXTERNAL caxpy, ccopy, cscal
82 IF( alpha.EQ.one )
THEN
83 IF( beta.EQ.zero )
THEN
85 CALL ccopy( m, a( 1, j ), 1, b( j, 1 ), ldb )
90 ELSE IF( beta.NE.one )
THEN
93 b( j, i ) = a( i, j ) + beta * b( j, i )
98 CALL caxpy( m, one, a( 1, j ), 1, b( j, 1 ), ldb )
104 ELSE IF( alpha.NE.zero )
THEN
105 IF( beta.EQ.zero )
THEN
108 b( j, i ) = alpha * a( i, j )
111 ELSE IF( beta.NE.one )
THEN
114 b( j, i ) = alpha * a( i, j ) + beta * b( j, i )
119 CALL caxpy( m, alpha, a( 1, j ), 1, b( j, 1 ), ldb )
126 IF( beta.EQ.zero )
THEN
132 ELSE IF( beta.NE.one )
THEN
134 CALL cscal( n, beta, b( 1, j ), 1 )
142 IF( alpha.EQ.one )
THEN
143 IF( beta.EQ.zero )
THEN
145 CALL ccopy( n, a( j, 1 ), lda, b( 1, j ), 1 )
150 ELSE IF( beta.NE.one )
THEN
153 b( i, j ) = a( j, i ) + beta * b( i, j )
158 CALL caxpy( n, one, a( j, 1 ), lda, b( 1, j ), 1 )
164 ELSE IF( alpha.NE.zero )
THEN
165 IF( beta.EQ.zero )
THEN
168 b( i, j ) = alpha * a( j, i )
171 ELSE IF( beta.NE.one )
THEN
174 b( i, j ) = alpha * a( j, i ) + beta * b( i, j )
179 CALL caxpy( n, alpha, a( j, 1 ), lda, b( 1, j ), 1 )
186 IF( beta.EQ.zero )
THEN
192 ELSE IF( beta.NE.one )
THEN
194 CALL cscal( n, beta, b( 1, j ), 1 )