1 SUBROUTINE dsyrk ( UPLO, TRANS, N, K, ALPHA, A, LDA,
4 CHARACTER*1 UPLO, TRANS
6 DOUBLE PRECISION ALPHA, BETA
8 DOUBLE PRECISION A( LDA, * ), C( LDC, * )
128 INTEGER I, INFO, J, L, NROWA
129 DOUBLE PRECISION TEMP
131 DOUBLE PRECISION ONE , ZERO
132 parameter( one = 1.0d+0, zero = 0.0d+0 )
138 IF( lsame( trans,
'N' ) )
THEN
143 upper = lsame( uplo,
'U' )
146 IF( ( .NOT.upper ).AND.
147 $ ( .NOT.lsame( uplo ,
'L' ) ) )
THEN
149 ELSE IF( ( .NOT.lsame( trans,
'N' ) ).AND.
150 $ ( .NOT.lsame( trans,
'T' ) ).AND.
151 $ ( .NOT.lsame( trans,
'C' ) ) )
THEN
153 ELSE IF( n .LT.0 )
THEN
155 ELSE IF( k .LT.0 )
THEN
157 ELSE IF( lda.LT.max( 1, nrowa ) )
THEN
159 ELSE IF( ldc.LT.max( 1, n ) )
THEN
163 CALL xerbla(
'DSYRK ', info )
170 $ ( ( ( alpha.EQ.zero ).OR.( k.EQ.0 ) ).AND.( beta.EQ.one ) ) )
175 IF( alpha.EQ.zero )
THEN
177 IF( beta.EQ.zero )
THEN
186 c( i, j ) = beta*c( i, j )
191 IF( beta.EQ.zero )
THEN
200 c( i, j ) = beta*c( i, j )
210 IF( lsame( trans,
'N' ) )
THEN
216 IF( beta.EQ.zero )
THEN
220 ELSE IF( beta.NE.one )
THEN
222 c( i, j ) = beta*c( i, j )
226 IF( a( j, l ).NE.zero )
THEN
227 temp = alpha*a( j, l )
229 c( i, j ) = c( i, j ) + temp*a( i, l )
236 IF( beta.EQ.zero )
THEN
240 ELSE IF( beta.NE.one )
THEN
242 c( i, j ) = beta*c( i, j )
246 IF( a( j, l ).NE.zero )
THEN
247 temp = alpha*a( j, l )
249 c( i, j ) = c( i, j ) + temp*a( i, l )
264 temp = temp + a( l, i )*a( l, j )
266 IF( beta.EQ.zero )
THEN
267 c( i, j ) = alpha*temp
269 c( i, j ) = alpha*temp + beta*c( i, j )
278 temp = temp + a( l, i )*a( l, j )
280 IF( beta.EQ.zero )
THEN
281 c( i, j ) = alpha*temp
283 c( i, j ) = alpha*temp + beta*c( i, j )
subroutine dsyrk(UPLO, TRANS, N, K, ALPHA, A, LDA, BETA, C, LDC)
subroutine xerbla(SRNAME, INFO)