190 SUBROUTINE zsytf2( UPLO, N, A, LDA, IPIV, INFO )
202 COMPLEX*16 A( LDA, * )
208 DOUBLE PRECISION ZERO, ONE
209 parameter( zero = 0.0d+0, one = 1.0d+0 )
210 DOUBLE PRECISION EIGHT, SEVTEN
211 parameter( eight = 8.0d+0, sevten = 17.0d+0 )
213 parameter( cone = ( 1.0d+0, 0.0d+0 ) )
217 INTEGER I, IMAX, J, JMAX, K, KK, KP, KSTEP
218 DOUBLE PRECISION ABSAKK, ALPHA, COLMAX, ROWMAX
219 COMPLEX*16 D11, D12, D21, D22, R1, T, WK, WKM1, WKP1, Z
222 LOGICAL DISNAN, LSAME
224 EXTERNAL disnan, lsame, izamax
230 INTRINSIC abs, dble, dimag, max, sqrt
233 DOUBLE PRECISION CABS1
236 cabs1( z ) = abs( dble( z ) ) + abs( dimag( 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(
'ZSYTF2', -info )
258 alpha = ( one+sqrt( sevten ) ) / eight
279 absakk = cabs1( a( k, k ) )
286 imax = izamax( k-1, a( 1, k ), 1 )
287 colmax = cabs1( a( imax, k ) )
292 IF( max( absakk, colmax ).EQ.zero .OR. disnan(absakk) )
THEN
301 IF( absakk.GE.alpha*colmax )
THEN
311 jmax = imax + izamax( k-imax, a( imax, imax+1 ), lda )
312 rowmax = cabs1( a( imax, jmax ) )
314 jmax = izamax( 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 zswap( kp-1, a( 1, kk ), 1, a( 1, kp ), 1 )
346 CALL zswap( 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 zsyr( uplo, k-1, -r1, a( 1, k ), 1, a, lda )
377 CALL zscal( 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 + izamax( n-k, a( k+1, k ), 1 )
457 colmax = cabs1( a( imax, k ) )
462 IF( max( absakk, colmax ).EQ.zero .OR. disnan(absakk) )
THEN
471 IF( absakk.GE.alpha*colmax )
THEN
481 jmax = k - 1 + izamax( imax-k, a( imax, k ), lda )
482 rowmax = cabs1( a( imax, jmax ) )
484 jmax = imax + izamax( 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 zswap( n-kp, a( kp+1, kk ), 1, a( kp+1, kp ), 1 )
517 CALL zswap( 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 zsyr( uplo, n-k, -r1, a( k+1, k ), 1,
547 $ a( k+1, k+1 ), lda )
551 CALL zscal( 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 zsyr(uplo, n, alpha, x, incx, a, lda)
ZSYR performs the symmetric rank-1 update of a complex symmetric matrix.
subroutine zsytf2(uplo, n, a, lda, ipiv, info)
ZSYTF2 computes the factorization of a real symmetric indefinite matrix, using the diagonal pivoting ...
subroutine zscal(n, za, zx, incx)
ZSCAL
subroutine zswap(n, zx, incx, zy, incy)
ZSWAP