1 SUBROUTINE cmatadd( M, N, ALPHA, A, LDA, BETA, C, LDC )
13 COMPLEX A( LDA, * ), C( LDC, * )
56 parameter( zero = ( 0.0e+0, 0.0e+0 ),
57 $ one = ( 1.0e+0, 0.0e+0 ) )
66 IF( (m.EQ.0).OR.(n.EQ.0).OR.((alpha.EQ.zero).AND.(beta.EQ.one)) )
70 IF( beta.EQ.zero )
THEN
71 IF( alpha.EQ.zero )
THEN
77 c( i, 1 ) = alpha*a( i, 1 )
81 IF( alpha.EQ.one )
THEN
82 IF( beta.EQ.one )
THEN
84 c( i, 1 ) = a( i, 1 ) + c( i, 1 )
88 c( i, 1 ) = a( i, 1 ) + beta*c( i, 1 )
91 ELSE IF( beta.EQ.one )
THEN
93 c( i, 1 ) = alpha*a( i, 1 ) + c( i, 1 )
97 c( i, 1 ) = alpha*a( i, 1 ) + beta*c( i, 1 )
102 IF( beta.EQ.zero )
THEN
103 IF( alpha.EQ.zero )
THEN
112 c( i, j ) = alpha * a( i, j )
117 IF( alpha.EQ.one )
THEN
118 IF( beta.EQ.one )
THEN
121 c( i, j ) = a( i, j ) + c( i, j )
127 c( i, j ) = a( i, j ) + beta * c( i, j )
131 ELSE IF( beta.EQ.one )
THEN
134 c( i, j ) = c( i, j ) + alpha * a( i, j )
140 c( i, j ) = alpha * a( i, j ) + beta * c( i, j )