1 SUBROUTINE dmatadd( M, N, ALPHA, A, LDA, BETA, C, LDC )
10 DOUBLE PRECISION ALPHA, BETA
13 DOUBLE PRECISION A( LDA, * ), C( LDC, * )
55 DOUBLE PRECISION ZERO, ONE
56 parameter( zero = 0.0d+0, one = 1.0d+0 )
65 IF( (m.EQ.0).OR.(n.EQ.0).OR.((alpha.EQ.zero).AND.(beta.EQ.one)) )
69 IF( beta.EQ.zero )
THEN
70 IF( alpha.EQ.zero )
THEN
76 c( i, 1 ) = alpha*a( i, 1 )
80 IF( alpha.EQ.one )
THEN
81 IF( beta.EQ.one )
THEN
83 c( i, 1 ) = a( i, 1 ) + c( i, 1 )
87 c( i, 1 ) = a( i, 1 ) + beta*c( i, 1 )
90 ELSE IF( beta.EQ.one )
THEN
92 c( i, 1 ) = alpha*a( i, 1 ) + c( i, 1 )
96 c( i, 1 ) = alpha*a( i, 1 ) + beta*c( i, 1 )
101 IF( beta.EQ.zero )
THEN
102 IF( alpha.EQ.zero )
THEN
111 c( i, j ) = alpha * a( i, j )
116 IF( alpha.EQ.one )
THEN
117 IF( beta.EQ.one )
THEN
120 c( i, j ) = a( i, j ) + c( i, j )
126 c( i, j ) = a( i, j ) + beta * c( i, j )
130 ELSE IF( beta.EQ.one )
THEN
133 c( i, j ) = c( i, j ) + alpha * a( i, j )
139 c( i, j ) = alpha * a( i, j ) + beta * c( i, j )