187 SUBROUTINE ssytf2( UPLO, N, A, LDA, IPIV, INFO )
207 parameter( zero = 0.0e+0, one = 1.0e+0 )
209 parameter( eight = 8.0e+0, sevten = 17.0e+0 )
213 INTEGER i, imax, j, jmax, k, kk, kp, kstep
214 REAL absakk, alpha, colmax, d11, d12, d21, d22, r1,
215 $ rowmax, t, wk, wkm1, wkp1
226 INTRINSIC abs, max, sqrt
233 upper =
lsame( uplo,
'U' )
234 IF( .NOT.upper .AND. .NOT.
lsame( uplo,
'L' ) )
THEN
236 ELSE IF( n.LT.0 )
THEN
238 ELSE IF( lda.LT.max( 1, n ) )
THEN
242 CALL
xerbla(
'SSYTF2', -info )
248 alpha = ( one+sqrt( sevten ) ) / eight
269 absakk = abs( a( k, k ) )
275 imax =
isamax( k-1, a( 1, k ), 1 )
276 colmax = abs( a( imax, k ) )
281 IF( (max( absakk, colmax ).EQ.zero) .OR.
sisnan(absakk) )
THEN
289 IF( absakk.GE.alpha*colmax )
THEN
299 jmax = imax +
isamax( k-imax, a( imax, imax+1 ), lda )
300 rowmax = abs( a( imax, jmax ) )
302 jmax =
isamax( imax-1, a( 1, imax ), 1 )
303 rowmax = max( rowmax, abs( a( jmax, imax ) ) )
306 IF( absakk.GE.alpha*colmax*( colmax / rowmax ) )
THEN
311 ELSE IF( abs( a( imax, imax ) ).GE.alpha*rowmax )
THEN
333 CALL
sswap( kp-1, a( 1, kk ), 1, a( 1, kp ), 1 )
334 CALL
sswap( kk-kp-1, a( kp+1, kk ), 1, a( kp, kp+1 ),
337 a( kk, kk ) = a( kp, kp )
339 IF( kstep.EQ.2 )
THEN
341 a( k-1, k ) = a( kp, k )
348 IF( kstep.EQ.1 )
THEN
361 CALL
ssyr( uplo, k-1, -r1, a( 1, k ), 1, a, lda )
365 CALL
sscal( k-1, r1, a( 1, k ), 1 )
383 d22 = a( k-1, k-1 ) / d12
384 d11 = a( k, k ) / d12
385 t = one / ( d11*d22-one )
388 DO 30 j = k - 2, 1, -1
389 wkm1 = d12*( d11*a( j, k-1 )-a( j, k ) )
390 wk = d12*( d22*a( j, k )-a( j, k-1 ) )
392 a( i, j ) = a( i, j ) - a( i, k )*wk -
406 IF( kstep.EQ.1 )
THEN
437 absakk = abs( a( k, k ) )
443 imax = k +
isamax( n-k, a( k+1, k ), 1 )
444 colmax = abs( a( imax, k ) )
449 IF( (max( absakk, colmax ).EQ.zero) .OR.
sisnan(absakk) )
THEN
457 IF( absakk.GE.alpha*colmax )
THEN
467 jmax = k - 1 +
isamax( imax-k, a( imax, k ), lda )
468 rowmax = abs( a( imax, jmax ) )
470 jmax = imax +
isamax( n-imax, a( imax+1, imax ), 1 )
471 rowmax = max( rowmax, abs( a( jmax, imax ) ) )
474 IF( absakk.GE.alpha*colmax*( colmax / rowmax ) )
THEN
479 ELSE IF( abs( a( imax, imax ) ).GE.alpha*rowmax )
THEN
502 $ CALL
sswap( n-kp, a( kp+1, kk ), 1, a( kp+1, kp ), 1 )
503 CALL
sswap( kp-kk-1, a( kk+1, kk ), 1, a( kp, kk+1 ),
506 a( kk, kk ) = a( kp, kp )
508 IF( kstep.EQ.2 )
THEN
510 a( k+1, k ) = a( kp, k )
517 IF( kstep.EQ.1 )
THEN
531 d11 = one / a( k, k )
532 CALL
ssyr( uplo, n-k, -d11, a( k+1, k ), 1,
533 $ a( k+1, k+1 ), lda )
537 CALL
sscal( n-k, d11, a( k+1, k ), 1 )
553 d11 = a( k+1, k+1 ) / d21
554 d22 = a( k, k ) / d21
555 t = one / ( d11*d22-one )
560 wk = d21*( d11*a( j, k )-a( j, k+1 ) )
561 wkp1 = d21*( d22*a( j, k+1 )-a( j, k ) )
564 a( i, j ) = a( i, j ) - a( i, k )*wk -
578 IF( kstep.EQ.1 )
THEN