1 SUBROUTINE dmmtcadd( M, N, ALPHA, A, LDA, BETA, B, LDB )
10 DOUBLE PRECISION ALPHA, BETA
13 DOUBLE PRECISION A( LDA, * ), B( LDB, * )
69 DOUBLE PRECISION ONE, ZERO
70 parameter( one = 1.0d+0, zero = 0.0d+0 )
76 EXTERNAL daxpy, dcopy, dscal
81 IF( alpha.EQ.one )
THEN
82 IF( beta.EQ.zero )
THEN
84 CALL dcopy( m, a( 1, j ), 1, b( j, 1 ), ldb )
89 ELSE IF( beta.NE.one )
THEN
92 b( j, i ) = a( i, j ) + beta * b( j, i )
97 CALL daxpy( m, one, a( 1, j ), 1, b( j, 1 ), ldb )
103 ELSE IF( alpha.NE.zero )
THEN
104 IF( beta.EQ.zero )
THEN
107 b( j, i ) = alpha * a( i, j )
110 ELSE IF( beta.NE.one )
THEN
113 b( j, i ) = alpha * a( i, j ) + beta * b( j, i )
118 CALL daxpy( m, alpha, a( 1, j ), 1, b( j, 1 ), ldb )
125 IF( beta.EQ.zero )
THEN
131 ELSE IF( beta.NE.one )
THEN
133 CALL dscal( n, beta, b( 1, j ), 1 )
141 IF( alpha.EQ.one )
THEN
142 IF( beta.EQ.zero )
THEN
144 CALL dcopy( n, a( j, 1 ), lda, b( 1, j ), 1 )
149 ELSE IF( beta.NE.one )
THEN
152 b( i, j ) = a( j, i ) + beta * b( i, j )
157 CALL daxpy( n, one, a( j, 1 ), lda, b( 1, j ), 1 )
163 ELSE IF( alpha.NE.zero )
THEN
164 IF( beta.EQ.zero )
THEN
167 b( i, j ) = alpha * a( j, i )
170 ELSE IF( beta.NE.one )
THEN
173 b( i, j ) = alpha * a( j, i ) + beta * b( i, j )
178 CALL daxpy( n, alpha, a( j, 1 ), lda, b( 1, j ), 1 )
185 IF( beta.EQ.zero )
THEN
191 ELSE IF( beta.NE.one )
THEN
193 CALL dscal( n, beta, b( 1, j ), 1 )