1 SUBROUTINE zmmadd( M, N, ALPHA, A, LDA, BETA, B, LDB )
10 COMPLEX*16 ALPHA, BETA
13 COMPLEX*16 A( LDA, * ), B( LDB, * )
69 parameter( one = ( 1.0d+0, 0.0d+0 ),
70 $ zero = ( 0.0d+0, 0.0d+0 ) )
76 EXTERNAL zaxpy, zcopy, zscal
80 IF( alpha.EQ.one )
THEN
81 IF( beta.EQ.zero )
THEN
83 CALL zcopy( 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 zaxpy( 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 zaxpy( 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 zscal( m, beta, b( 1, j ), 1 )