1 SUBROUTINE smmcadd( M, N, ALPHA, A, LDA, BETA, B, LDB )
13 REAL A( LDA, * ), B( LDB, * )
69 parameter( one = 1.0e+0, zero = 0.0e+0 )
75 EXTERNAL saxpy, scopy, sscal
79 IF( alpha.EQ.one )
THEN
80 IF( beta.EQ.zero )
THEN
82 CALL scopy( 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 saxpy( 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 saxpy( 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 sscal( m, beta, b( 1, j ), 1 )