194 SUBROUTINE ssytf2( UPLO, N, A, LDA, IPIV, INFO )
213 parameter( zero = 0.0e+0, one = 1.0e+0 )
215 parameter( eight = 8.0e+0, sevten = 17.0e+0 )
219 INTEGER I, IMAX, J, JMAX, K, KK, KP, KSTEP
220 REAL ABSAKK, ALPHA, COLMAX, D11, D12, D21, D22, R1,
221 $ ROWMAX, T, WK, WKM1, WKP1
224 LOGICAL LSAME, SISNAN
226 EXTERNAL lsame, isamax, sisnan
232 INTRINSIC abs, max, sqrt
239 upper = lsame( uplo,
'U' )
240 IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
242 ELSE IF( n.LT.0 )
THEN
244 ELSE IF( lda.LT.max( 1, n ) )
THEN
248 CALL xerbla(
'SSYTF2', -info )
254 alpha = ( one+sqrt( sevten ) ) / eight
275 absakk = abs( a( k, k ) )
282 imax = isamax( k-1, a( 1, k ), 1 )
283 colmax = abs( a( imax, k ) )
288 IF( (max( absakk, colmax ).EQ.zero) .OR. sisnan(absakk) )
THEN
297 IF( absakk.GE.alpha*colmax )
THEN
307 jmax = imax + isamax( k-imax, a( imax, imax+1 ), lda )
308 rowmax = abs( a( imax, jmax ) )
310 jmax = isamax( imax-1, a( 1, imax ), 1 )
311 rowmax = max( rowmax, abs( a( jmax, imax ) ) )
314 IF( absakk.GE.alpha*colmax*( colmax / rowmax ) )
THEN
319 ELSE IF( abs( a( imax, imax ) ).GE.alpha*rowmax )
THEN
341 CALL sswap( kp-1, a( 1, kk ), 1, a( 1, kp ), 1 )
342 CALL sswap( kk-kp-1, a( kp+1, kk ), 1, a( kp, kp+1 ),
345 a( kk, kk ) = a( kp, kp )
347 IF( kstep.EQ.2 )
THEN
349 a( k-1, k ) = a( kp, k )
356 IF( kstep.EQ.1 )
THEN
369 CALL ssyr( uplo, k-1, -r1, a( 1, k ), 1, a, lda )
373 CALL sscal( k-1, r1, a( 1, k ), 1 )
391 d22 = a( k-1, k-1 ) / d12
392 d11 = a( k, k ) / d12
393 t = one / ( d11*d22-one )
396 DO 30 j = k - 2, 1, -1
397 wkm1 = d12*( d11*a( j, k-1 )-a( j, k ) )
398 wk = d12*( d22*a( j, k )-a( j, k-1 ) )
400 a( i, j ) = a( i, j ) - a( i, k )*wk -
414 IF( kstep.EQ.1 )
THEN
445 absakk = abs( a( k, k ) )
452 imax = k + isamax( n-k, a( k+1, k ), 1 )
453 colmax = abs( a( imax, k ) )
458 IF( (max( absakk, colmax ).EQ.zero) .OR. sisnan(absakk) )
THEN
467 IF( absakk.GE.alpha*colmax )
THEN
477 jmax = k - 1 + isamax( imax-k, a( imax, k ), lda )
478 rowmax = abs( a( imax, jmax ) )
480 jmax = imax + isamax( n-imax, a( imax+1, imax ), 1 )
481 rowmax = max( rowmax, abs( a( jmax, imax ) ) )
484 IF( absakk.GE.alpha*colmax*( colmax / rowmax ) )
THEN
489 ELSE IF( abs( a( imax, imax ) ).GE.alpha*rowmax )
THEN
512 $
CALL sswap( n-kp, a( kp+1, kk ), 1, a( kp+1, kp ), 1 )
513 CALL sswap( kp-kk-1, a( kk+1, kk ), 1, a( kp, kk+1 ),
516 a( kk, kk ) = a( kp, kp )
518 IF( kstep.EQ.2 )
THEN
520 a( k+1, k ) = a( kp, k )
527 IF( kstep.EQ.1 )
THEN
541 d11 = one / a( k, k )
542 CALL ssyr( uplo, n-k, -d11, a( k+1, k ), 1,
543 $ a( k+1, k+1 ), lda )
547 CALL sscal( n-k, d11, a( k+1, k ), 1 )
563 d11 = a( k+1, k+1 ) / d21
564 d22 = a( k, k ) / d21
565 t = one / ( d11*d22-one )
570 wk = d21*( d11*a( j, k )-a( j, k+1 ) )
571 wkp1 = d21*( d22*a( j, k+1 )-a( j, k ) )
574 a( i, j ) = a( i, j ) - a( i, k )*wk -
588 IF( kstep.EQ.1 )
THEN
subroutine xerbla(srname, info)
subroutine ssyr(uplo, n, alpha, x, incx, a, lda)
SSYR
subroutine ssytf2(uplo, n, a, lda, ipiv, info)
SSYTF2 computes the factorization of a real symmetric indefinite matrix, using the diagonal pivoting ...
subroutine sscal(n, sa, sx, incx)
SSCAL
subroutine sswap(n, sx, incx, sy, incy)
SSWAP