190 SUBROUTINE csytf2( UPLO, N, A, LDA, IPIV, INFO )
209 parameter( zero = 0.0e+0, one = 1.0e+0 )
211 parameter( eight = 8.0e+0, sevten = 17.0e+0 )
213 parameter( cone = ( 1.0e+0, 0.0e+0 ) )
217 INTEGER I, IMAX, J, JMAX, K, KK, KP, KSTEP
218 REAL ABSAKK, ALPHA, COLMAX, ROWMAX
219 COMPLEX D11, D12, D21, D22, R1, T, WK, WKM1, WKP1, Z
222 LOGICAL LSAME, SISNAN
224 EXTERNAL lsame, icamax, sisnan
230 INTRINSIC abs, aimag, max, real, sqrt
236 cabs1( z ) = abs( real( z ) ) + abs( aimag( z ) )
243 upper = lsame( uplo,
'U' )
244 IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
246 ELSE IF( n.LT.0 )
THEN
248 ELSE IF( lda.LT.max( 1, n ) )
THEN
252 CALL xerbla(
'CSYTF2', -info )
258 alpha = ( one+sqrt( sevten ) ) / eight
279 absakk = cabs1( a( k, k ) )
286 imax = icamax( k-1, a( 1, k ), 1 )
287 colmax = cabs1( a( imax, k ) )
292 IF( max( absakk, colmax ).EQ.zero .OR. sisnan(absakk) )
THEN
301 IF( absakk.GE.alpha*colmax )
THEN
311 jmax = imax + icamax( k-imax, a( imax, imax+1 ), lda )
312 rowmax = cabs1( a( imax, jmax ) )
314 jmax = icamax( imax-1, a( 1, imax ), 1 )
315 rowmax = max( rowmax, cabs1( a( jmax, imax ) ) )
318 IF( absakk.GE.alpha*colmax*( colmax / rowmax ) )
THEN
323 ELSE IF( cabs1( a( imax, imax ) ).GE.alpha*rowmax )
THEN
345 CALL cswap( kp-1, a( 1, kk ), 1, a( 1, kp ), 1 )
346 CALL cswap( kk-kp-1, a( kp+1, kk ), 1, a( kp, kp+1 ),
349 a( kk, kk ) = a( kp, kp )
351 IF( kstep.EQ.2 )
THEN
353 a( k-1, k ) = a( kp, k )
360 IF( kstep.EQ.1 )
THEN
372 r1 = cone / a( k, k )
373 CALL csyr( uplo, k-1, -r1, a( 1, k ), 1, a, lda )
377 CALL cscal( k-1, r1, a( 1, k ), 1 )
395 d22 = a( k-1, k-1 ) / d12
396 d11 = a( k, k ) / d12
397 t = cone / ( d11*d22-cone )
400 DO 30 j = k - 2, 1, -1
401 wkm1 = d12*( d11*a( j, k-1 )-a( j, k ) )
402 wk = d12*( d22*a( j, k )-a( j, k-1 ) )
404 a( i, j ) = a( i, j ) - a( i, k )*wk -
418 IF( kstep.EQ.1 )
THEN
449 absakk = cabs1( a( k, k ) )
456 imax = k + icamax( n-k, a( k+1, k ), 1 )
457 colmax = cabs1( a( imax, k ) )
462 IF( max( absakk, colmax ).EQ.zero .OR. sisnan(absakk) )
THEN
471 IF( absakk.GE.alpha*colmax )
THEN
481 jmax = k - 1 + icamax( imax-k, a( imax, k ), lda )
482 rowmax = cabs1( a( imax, jmax ) )
484 jmax = imax + icamax( n-imax, a( imax+1, imax ), 1 )
485 rowmax = max( rowmax, cabs1( a( jmax, imax ) ) )
488 IF( absakk.GE.alpha*colmax*( colmax / rowmax ) )
THEN
493 ELSE IF( cabs1( a( imax, imax ) ).GE.alpha*rowmax )
THEN
516 $
CALL cswap( n-kp, a( kp+1, kk ), 1, a( kp+1, kp ), 1 )
517 CALL cswap( kp-kk-1, a( kk+1, kk ), 1, a( kp, kk+1 ),
520 a( kk, kk ) = a( kp, kp )
522 IF( kstep.EQ.2 )
THEN
524 a( k+1, k ) = a( kp, k )
531 IF( kstep.EQ.1 )
THEN
545 r1 = cone / a( k, k )
546 CALL csyr( uplo, n-k, -r1, a( k+1, k ), 1,
547 $ a( k+1, k+1 ), lda )
551 CALL cscal( n-k, r1, a( k+1, k ), 1 )
568 d11 = a( k+1, k+1 ) / d21
569 d22 = a( k, k ) / d21
570 t = cone / ( d11*d22-cone )
574 wk = d21*( d11*a( j, k )-a( j, k+1 ) )
575 wkp1 = d21*( d22*a( j, k+1 )-a( j, k ) )
577 a( i, j ) = a( i, j ) - a( i, k )*wk -
589 IF( kstep.EQ.1 )
THEN
subroutine xerbla(srname, info)
subroutine csyr(uplo, n, alpha, x, incx, a, lda)
CSYR performs the symmetric rank-1 update of a complex symmetric matrix.
subroutine csytf2(uplo, n, a, lda, ipiv, info)
CSYTF2 computes the factorization of a real symmetric indefinite matrix, using the diagonal pivoting ...
subroutine cscal(n, ca, cx, incx)
CSCAL
subroutine cswap(n, cx, incx, cy, incy)
CSWAP