1 SUBROUTINE dmmadd( M, N, ALPHA, A, LDA, BETA, B, LDB )
10 DOUBLE PRECISION ALPHA, BETA
13 DOUBLE PRECISION A( LDA, * ), B( LDB, * )
68 DOUBLE PRECISION ONE, ZERO
69 parameter( one = 1.0d+0, zero = 0.0d+0 )
75 EXTERNAL daxpy, dcopy, dscal
79 IF( alpha.EQ.one )
THEN
80 IF( beta.EQ.zero )
THEN
82 CALL dcopy( m, a( 1, j ), 1, b( 1, j ), 1 )
87 ELSE IF( beta.NE.one )
THEN
90 b( i, j ) = a( i, j ) + beta * b( i, j )
95 CALL daxpy( m, one, a( 1, j ), 1, b( 1, j ), 1 )
101 ELSE IF( alpha.NE.zero )
THEN
102 IF( beta.EQ.zero )
THEN
105 b( i, j ) = alpha * a( i, j )
108 ELSE IF( beta.NE.one )
THEN
111 b( i, j ) = alpha * a( i, j ) + beta * b( i, j )
116 CALL daxpy( m, alpha, a( 1, j ), 1, b( 1, j ), 1 )
123 IF( beta.EQ.zero )
THEN
129 ELSE IF( beta.NE.one )
THEN
131 CALL dscal( m, beta, b( 1, j ), 1 )