175 SUBROUTINE dlasyf( UPLO, N, NB, KB, A, LDA, IPIV, W, LDW, INFO )
183 INTEGER INFO, KB, LDA, LDW, N, NB
187 DOUBLE PRECISION A( LDA, * ), W( LDW, * )
193 DOUBLE PRECISION ZERO, ONE
194 parameter( zero = 0.0d+0, one = 1.0d+0 )
195 DOUBLE PRECISION EIGHT, SEVTEN
196 parameter( eight = 8.0d+0, sevten = 17.0d+0 )
199 INTEGER IMAX, J, JB, JJ, JMAX, JP, K, KK, KKW, KP,
201 DOUBLE PRECISION ABSAKK, ALPHA, COLMAX, D11, D21, D22, R1,
207 EXTERNAL lsame, idamax
213 INTRINSIC abs, max, min, sqrt
221 alpha = ( one+sqrt( sevten ) ) / eight
223 IF( lsame( uplo,
'U' ) )
THEN
239 IF( ( k.LE.n-nb+1 .AND. nb.LT.n ) .OR. k.LT.1 )
244 CALL dcopy( k, a( 1, k ), 1, w( 1, kw ), 1 )
246 $
CALL dgemv(
'No transpose', k, n-k, -one, a( 1, k+1 ), lda,
247 $ w( k, kw+1 ), ldw, one, w( 1, kw ), 1 )
254 absakk = abs( w( k, kw ) )
261 imax = idamax( k-1, w( 1, kw ), 1 )
262 colmax = abs( w( imax, kw ) )
267 IF( max( absakk, colmax ).EQ.zero )
THEN
275 IF( absakk.GE.alpha*colmax )
THEN
284 CALL dcopy( imax, a( 1, imax ), 1, w( 1, kw-1 ), 1 )
285 CALL dcopy( k-imax, a( imax, imax+1 ), lda,
286 $ w( imax+1, kw-1 ), 1 )
288 $
CALL dgemv(
'No transpose', k, n-k, -one, a( 1, k+1 ),
289 $ lda, w( imax, kw+1 ), ldw, one,
295 jmax = imax + idamax( k-imax, w( imax+1, kw-1 ), 1 )
296 rowmax = abs( w( jmax, kw-1 ) )
298 jmax = idamax( imax-1, w( 1, kw-1 ), 1 )
299 rowmax = max( rowmax, abs( w( jmax, kw-1 ) ) )
302 IF( absakk.GE.alpha*colmax*( colmax / rowmax ) )
THEN
307 ELSE IF( abs( w( imax, kw-1 ) ).GE.alpha*rowmax )
THEN
316 CALL dcopy( k, w( 1, kw-1 ), 1, w( 1, kw ), 1 )
347 a( kp, kp ) = a( kk, kk )
348 CALL dcopy( kk-1-kp, a( kp+1, kk ), 1, a( kp, kp+1 ),
351 $
CALL dcopy( kp-1, a( 1, kk ), 1, a( 1, kp ), 1 )
359 $
CALL dswap( n-k, a( kk, k+1 ), lda, a( kp, k+1 ),
361 CALL dswap( n-kk+1, w( kk, kkw ), ldw, w( kp, kkw ),
365 IF( kstep.EQ.1 )
THEN
380 CALL dcopy( k, w( 1, kw ), 1, a( 1, k ), 1 )
382 CALL dscal( k-1, r1, a( 1, k ), 1 )
429 d11 = w( k, kw ) / d21
430 d22 = w( k-1, kw-1 ) / d21
431 t = one / ( d11*d22-one )
439 a( j, k-1 ) = d21*( d11*w( j, kw-1 )-w( j, kw ) )
440 a( j, k ) = d21*( d22*w( j, kw )-w( j, kw-1 ) )
446 a( k-1, k-1 ) = w( k-1, kw-1 )
447 a( k-1, k ) = w( k-1, kw )
448 a( k, k ) = w( k, kw )
456 IF( kstep.EQ.1 )
THEN
476 DO 50 j = ( ( k-1 ) / nb )*nb + 1, 1, -nb
477 jb = min( nb, k-j+1 )
481 DO 40 jj = j, j + jb - 1
482 CALL dgemv(
'No transpose', jj-j+1, n-k, -one,
483 $ a( j, k+1 ), lda, w( jj, kw+1 ), ldw, one,
489 CALL dgemm(
'No transpose',
'Transpose', j-1, jb, n-k, -one,
490 $ a( 1, k+1 ), lda, w( j, kw+1 ), ldw, one,
514 IF( jp.NE.jj .AND. j.LE.n )
515 $
CALL dswap( n-j+1, a( jp, j ), lda, a( jj, j ), lda )
536 IF( ( k.GE.nb .AND. nb.LT.n ) .OR. k.GT.n )
541 CALL dcopy( n-k+1, a( k, k ), 1, w( k, k ), 1 )
542 CALL dgemv(
'No transpose', n-k+1, k-1, -one, a( k, 1 ), lda,
543 $ w( k, 1 ), ldw, one, w( k, k ), 1 )
550 absakk = abs( w( k, k ) )
557 imax = k + idamax( n-k, w( k+1, k ), 1 )
558 colmax = abs( w( imax, k ) )
563 IF( max( absakk, colmax ).EQ.zero )
THEN
571 IF( absakk.GE.alpha*colmax )
THEN
580 CALL dcopy( imax-k, a( imax, k ), lda, w( k, k+1 ), 1 )
581 CALL dcopy( n-imax+1, a( imax, imax ), 1, w( imax, k+1 ),
583 CALL dgemv(
'No transpose', n-k+1, k-1, -one, a( k, 1 ),
584 $ lda, w( imax, 1 ), ldw, one, w( k, k+1 ), 1 )
589 jmax = k - 1 + idamax( imax-k, w( k, k+1 ), 1 )
590 rowmax = abs( w( jmax, k+1 ) )
592 jmax = imax + idamax( n-imax, w( imax+1, k+1 ), 1 )
593 rowmax = max( rowmax, abs( w( jmax, k+1 ) ) )
596 IF( absakk.GE.alpha*colmax*( colmax / rowmax ) )
THEN
601 ELSE IF( abs( w( imax, k+1 ) ).GE.alpha*rowmax )
THEN
610 CALL dcopy( n-k+1, w( k, k+1 ), 1, w( k, k ), 1 )
637 a( kp, kp ) = a( kk, kk )
638 CALL dcopy( kp-kk-1, a( kk+1, kk ), 1, a( kp, kk+1 ),
641 $
CALL dcopy( n-kp, a( kp+1, kk ), 1, a( kp+1, kp ), 1 )
649 $
CALL dswap( k-1, a( kk, 1 ), lda, a( kp, 1 ), lda )
650 CALL dswap( kk, w( kk, 1 ), ldw, w( kp, 1 ), ldw )
653 IF( kstep.EQ.1 )
THEN
668 CALL dcopy( n-k+1, w( k, k ), 1, a( k, k ), 1 )
671 CALL dscal( n-k, r1, a( k+1, k ), 1 )
719 d11 = w( k+1, k+1 ) / d21
720 d22 = w( k, k ) / d21
721 t = one / ( d11*d22-one )
729 a( j, k ) = d21*( d11*w( j, k )-w( j, k+1 ) )
730 a( j, k+1 ) = d21*( d22*w( j, k+1 )-w( j, k ) )
736 a( k, k ) = w( k, k )
737 a( k+1, k ) = w( k+1, k )
738 a( k+1, k+1 ) = w( k+1, k+1 )
746 IF( kstep.EQ.1 )
THEN
767 jb = min( nb, n-j+1 )
771 DO 100 jj = j, j + jb - 1
772 CALL dgemv(
'No transpose', j+jb-jj, k-1, -one,
773 $ a( jj, 1 ), lda, w( jj, 1 ), ldw, one,
780 $
CALL dgemm(
'No transpose',
'Transpose', n-j-jb+1, jb,
781 $ k-1, -one, a( j+jb, 1 ), lda, w( j, 1 ), ldw,
782 $ one, a( j+jb, j ), lda )
805 IF( jp.NE.jj .AND. j.GE.1 )
806 $
CALL dswap( j, a( jp, 1 ), lda, a( jj, 1 ), lda )
subroutine dcopy(n, dx, incx, dy, incy)
DCOPY
subroutine dgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
DGEMM
subroutine dgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
DGEMV
subroutine dlasyf(uplo, n, nb, kb, a, lda, ipiv, w, ldw, info)
DLASYF computes a partial factorization of a real symmetric matrix using the Bunch-Kaufman diagonal p...
subroutine dscal(n, da, dx, incx)
DSCAL
subroutine dswap(n, dx, incx, dy, incy)
DSWAP