1 SUBROUTINE cmmadd( M, N, ALPHA, A, LDA, BETA, B, LDB )
13 COMPLEX A( LDA, * ), B( LDB, * )
69 parameter( one = ( 1.0e+0, 0.0e+0 ),
70 $ zero = ( 0.0e+0, 0.0e+0 ) )
76 EXTERNAL caxpy, ccopy, cscal
80 IF( alpha.EQ.one )
THEN
81 IF( beta.EQ.zero )
THEN
83 CALL ccopy( m, a( 1, j ), 1, b( 1, j ), 1 )
88 ELSE IF( beta.NE.one )
THEN
91 b( i, j ) = a( i, j ) + beta * b( i, j )
96 CALL caxpy( m, one, a( 1, j ), 1, b( 1, j ), 1 )
102 ELSE IF( alpha.NE.zero )
THEN
103 IF( beta.EQ.zero )
THEN
106 b( i, j ) = alpha * a( i, j )
109 ELSE IF( beta.NE.one )
THEN
112 b( i, j ) = alpha * a( i, j ) + beta * b( i, j )
117 CALL caxpy( m, alpha, a( 1, j ), 1, b( 1, j ), 1 )
124 IF( beta.EQ.zero )
THEN
130 ELSE IF( beta.NE.one )
THEN
132 CALL cscal( m, beta, b( 1, j ), 1 )