195 SUBROUTINE zsytf2_rook( UPLO, N, A, LDA, IPIV, INFO )
208 COMPLEX*16 A( lda, * )
214 DOUBLE PRECISION ZERO, ONE
215 parameter ( zero = 0.0d+0, one = 1.0d+0 )
216 DOUBLE PRECISION EIGHT, SEVTEN
217 parameter ( eight = 8.0d+0, sevten = 17.0d+0 )
219 parameter ( cone = ( 1.0d+0, 0.0d+0 ) )
223 INTEGER I, IMAX, J, JMAX, ITEMP, K, KK, KP, KSTEP,
225 DOUBLE PRECISION ABSAKK, ALPHA, COLMAX, ROWMAX, DTEMP, SFMIN
226 COMPLEX*16 D11, D12, D21, D22, T, WK, WKM1, WKP1, Z
231 DOUBLE PRECISION DLAMCH
232 EXTERNAL lsame, izamax, dlamch
238 INTRINSIC abs, max, sqrt, dimag, dble
241 DOUBLE PRECISION CABS1
244 cabs1( z ) = abs( dble( z ) ) + abs( dimag( z ) )
251 upper = lsame( uplo,
'U' )
252 IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
254 ELSE IF( n.LT.0 )
THEN
256 ELSE IF( lda.LT.max( 1, n ) )
THEN
260 CALL xerbla(
'ZSYTF2_ROOK', -info )
266 alpha = ( one+sqrt( sevten ) ) / eight
270 sfmin = dlamch(
'S' )
292 absakk = cabs1( a( k, k ) )
299 imax = izamax( k-1, a( 1, k ), 1 )
300 colmax = cabs1( a( imax, k ) )
305 IF( (max( absakk, colmax ).EQ.zero) )
THEN
319 IF( .NOT.( absakk.LT.alpha*colmax ) )
THEN
340 jmax = imax + izamax( k-imax, a( imax, imax+1 ),
342 rowmax = cabs1( a( imax, jmax ) )
348 itemp = izamax( imax-1, a( 1, imax ), 1 )
349 dtemp = cabs1( a( itemp, imax ) )
350 IF( dtemp.GT.rowmax )
THEN
359 IF( .NOT.( cabs1(a( imax, imax )).LT.alpha*rowmax ) )
371 ELSE IF( ( p.EQ.jmax ).OR.( rowmax.LE.colmax ) )
THEN
390 IF( .NOT. done )
GOTO 12
398 IF( ( kstep.EQ.2 ) .AND. ( p.NE.k ) )
THEN
404 $
CALL zswap( p-1, a( 1, k ), 1, a( 1, p ), 1 )
406 $
CALL zswap( k-p-1, a( p+1, k ), 1, a( p, p+1 ),
409 a( k, k ) = a( p, p )
422 $
CALL zswap( kp-1, a( 1, kk ), 1, a( 1, kp ), 1 )
423 IF( ( kk.GT.1 ) .AND. ( kp.LT.(kk-1) ) )
424 $
CALL zswap( kk-kp-1, a( kp+1, kk ), 1, a( kp, kp+1 ),
427 a( kk, kk ) = a( kp, kp )
429 IF( kstep.EQ.2 )
THEN
431 a( k-1, k ) = a( kp, k )
438 IF( kstep.EQ.1 )
THEN
451 IF( cabs1( a( k, k ) ).GE.sfmin )
THEN
457 d11 = cone / a( k, k )
458 CALL zsyr( uplo, k-1, -d11, a( 1, k ), 1, a, lda )
462 CALL zscal( k-1, d11, a( 1, k ), 1 )
469 a( ii, k ) = a( ii, k ) / d11
477 CALL zsyr( uplo, k-1, -d11, a( 1, k ), 1, a, lda )
500 d22 = a( k-1, k-1 ) / d12
501 d11 = a( k, k ) / d12
502 t = cone / ( d11*d22-cone )
504 DO 30 j = k - 2, 1, -1
506 wkm1 = t*( d11*a( j, k-1 )-a( j, k ) )
507 wk = t*( d22*a( j, k )-a( j, k-1 ) )
510 a( i, j ) = a( i, j ) - (a( i, k ) / d12 )*wk -
511 $ ( a( i, k-1 ) / d12 )*wkm1
517 a( j, k-1 ) = wkm1 / d12
528 IF( kstep.EQ.1 )
THEN
560 absakk = cabs1( a( k, k ) )
567 imax = k + izamax( n-k, a( k+1, k ), 1 )
568 colmax = cabs1( a( imax, k ) )
573 IF( ( max( absakk, colmax ).EQ.zero ) )
THEN
587 IF( .NOT.( absakk.LT.alpha*colmax ) )
THEN
607 jmax = k - 1 + izamax( imax-k, a( imax, k ), lda )
608 rowmax = cabs1( a( imax, jmax ) )
614 itemp = imax + izamax( n-imax, a( imax+1, imax ),
616 dtemp = cabs1( a( itemp, imax ) )
617 IF( dtemp.GT.rowmax )
THEN
626 IF( .NOT.( cabs1(a( imax, imax )).LT.alpha*rowmax ) )
638 ELSE IF( ( p.EQ.jmax ).OR.( rowmax.LE.colmax ) )
THEN
657 IF( .NOT. done )
GOTO 42
665 IF( ( kstep.EQ.2 ) .AND. ( p.NE.k ) )
THEN
671 $
CALL zswap( n-p, a( p+1, k ), 1, a( p+1, p ), 1 )
673 $
CALL zswap( p-k-1, a( k+1, k ), 1, a( p, k+1 ), lda )
675 a( k, k ) = a( p, p )
688 $
CALL zswap( n-kp, a( kp+1, kk ), 1, a( kp+1, kp ), 1 )
689 IF( ( kk.LT.n ) .AND. ( kp.GT.(kk+1) ) )
690 $
CALL zswap( kp-kk-1, a( kk+1, kk ), 1, a( kp, kk+1 ),
693 a( kk, kk ) = a( kp, kp )
695 IF( kstep.EQ.2 )
THEN
697 a( k+1, k ) = a( kp, k )
704 IF( kstep.EQ.1 )
THEN
717 IF( cabs1( a( k, k ) ).GE.sfmin )
THEN
723 d11 = cone / a( k, k )
724 CALL zsyr( uplo, n-k, -d11, a( k+1, k ), 1,
725 $ a( k+1, k+1 ), lda )
729 CALL zscal( n-k, d11, a( k+1, k ), 1 )
736 a( ii, k ) = a( ii, k ) / d11
744 CALL zsyr( uplo, n-k, -d11, a( k+1, k ), 1,
745 $ a( k+1, k+1 ), lda )
769 d11 = a( k+1, k+1 ) / d21
770 d22 = a( k, k ) / d21
771 t = cone / ( d11*d22-cone )
777 wk = t*( d11*a( j, k )-a( j, k+1 ) )
778 wkp1 = t*( d22*a( j, k+1 )-a( j, k ) )
783 a( i, j ) = a( i, j ) - ( a( i, k ) / d21 )*wk -
784 $ ( a( i, k+1 ) / d21 )*wkp1
790 a( j, k+1 ) = wkp1 / d21
801 IF( kstep.EQ.1 )
THEN
subroutine zsytf2_rook(UPLO, N, A, LDA, IPIV, INFO)
ZSYTF2_ROOK computes the factorization of a complex symmetric indefinite matrix using the bounded Bun...
subroutine zswap(N, ZX, INCX, ZY, INCY)
ZSWAP
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine zsyr(UPLO, N, ALPHA, X, INCX, A, LDA)
ZSYR performs the symmetric rank-1 update of a complex symmetric matrix.
subroutine zscal(N, ZA, ZX, INCX)
ZSCAL