1 SUBROUTINE zmmtadd( M, N, ALPHA, A, LDA, BETA, B, LDB )
10 COMPLEX*16 ALPHA, BETA
13 COMPLEX*16 A( LDA, * ), B( LDB, * )
70 parameter( one = ( 1.0d+0, 0.0d+0 ),
71 $ zero = ( 0.0d+0, 0.0d+0 ) )
77 EXTERNAL zaxpy, zcopy, zscal
82 IF( alpha.EQ.one )
THEN
83 IF( beta.EQ.zero )
THEN
85 CALL zcopy( 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 zaxpy( 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 zaxpy( 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 zscal( n, beta, b( 1, j ), 1 )
142 IF( alpha.EQ.one )
THEN
143 IF( beta.EQ.zero )
THEN
145 CALL zcopy( 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 zaxpy( 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 zaxpy( 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 zscal( n, beta, b( 1, j ), 1 )