1 SUBROUTINE smmtcadd( M, N, ALPHA, A, LDA, BETA, B, LDB )
13 REAL A( LDA, * ), B( LDB, * )
70 parameter( one = 1.0e+0, zero = 0.0e+0 )
76 EXTERNAL saxpy, scopy, sscal
81 IF( alpha.EQ.one )
THEN
82 IF( beta.EQ.zero )
THEN
84 CALL scopy( 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 saxpy( 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 saxpy( 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 sscal( n, beta, b( 1, j ), 1 )
141 IF( alpha.EQ.one )
THEN
142 IF( beta.EQ.zero )
THEN
144 CALL scopy( 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 saxpy( 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 saxpy( 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 sscal( n, beta, b( 1, j ), 1 )