330 SUBROUTINE dlaqp2rk( M, N, NRHS, IOFFSET, KMAX, ABSTOL, RELTOL,
331 $ KP1, MAXC2NRM, A, LDA, K, MAXC2NRMK,
332 $ RELMAXC2NRMK, JPIV, TAU, VN1, VN2, WORK,
341 INTEGER INFO, IOFFSET, KP1, K, KMAX, LDA, M, N, NRHS
342 DOUBLE PRECISION ABSTOL, MAXC2NRM, MAXC2NRMK, RELMAXC2NRMK,
347 DOUBLE PRECISION A( LDA, * ), TAU( * ), VN1( * ), VN2( * ),
354 DOUBLE PRECISION ZERO, ONE
355 PARAMETER ( ZERO = 0.0d+0, one = 1.0d+0 )
358 INTEGER I, ITEMP, J, JMAXC2NRM, KK, KP, MINMNFACT,
360 DOUBLE PRECISION HUGEVAL, TEMP, TEMP2, TOL3Z
366 INTRINSIC abs, max, min, sqrt
371 DOUBLE PRECISION DLAMCH, DNRM2
372 EXTERNAL disnan, dlamch, idamax, dnrm2
388 minmnfact = min( m-ioffset, n )
389 minmnupdt = min( m-ioffset, n+nrhs )
390 kmax = min( kmax, minmnfact )
391 tol3z = sqrt( dlamch(
'Epsilon' ) )
392 hugeval = dlamch(
'Overflow' )
421 kp = ( kk-1 ) + idamax( n-kk+1, vn1( kk ), 1 )
428 maxc2nrmk = vn1( kp )
440 IF( disnan( maxc2nrmk ) )
THEN
450 relmaxc2nrmk = maxc2nrmk
467 IF( maxc2nrmk.EQ.zero )
THEN
499 IF( info.EQ.0 .AND. maxc2nrmk.GT.hugeval )
THEN
500 info = n + kk - 1 + kp
515 relmaxc2nrmk = maxc2nrmk / maxc2nrm
517 IF( maxc2nrmk.LE.abstol .OR. relmaxc2nrmk.LE.reltol )
THEN
556 CALL dswap( m, a( 1, kp ), 1, a( 1, kk ), 1 )
557 vn1( kp ) = vn1( kk )
558 vn2( kp ) = vn2( kk )
560 jpiv( kp ) = jpiv( kk )
570 CALL dlarfg( m-i+1, a( i, kk ), a( i+1, kk ), 1,
586 IF( disnan( tau(kk) ) )
THEN
592 maxc2nrmk = tau( kk )
593 relmaxc2nrmk = tau( kk )
613 IF( kk.LT.minmnupdt )
THEN
614 CALL dlarf1f(
'Left', m-i+1, n+nrhs-kk, a( i, kk ), 1,
615 $ tau( kk ), a( i, kk+1 ), lda, work( 1 ) )
618 IF( kk.LT.minmnfact )
THEN
625 IF( vn1( j ).NE.zero )
THEN
630 temp = one - ( abs( a( i, j ) ) / vn1( j ) )**2
631 temp = max( temp, zero )
632 temp2 = temp*( vn1( j ) / vn2( j ) )**2
633 IF( temp2 .LE. tol3z )
THEN
640 vn1( j ) = dnrm2( m-i, a( i+1, j ), 1 )
650 vn1( j ) = vn1( j )*sqrt( temp )
672 IF( k.LT.minmnfact )
THEN
674 jmaxc2nrm = k + idamax( n-k, vn1( k+1 ), 1 )
675 maxc2nrmk = vn1( jmaxc2nrm )
680 relmaxc2nrmk = maxc2nrmk / maxc2nrm
692 DO j = k + 1, minmnfact
subroutine dlaqp2rk(m, n, nrhs, ioffset, kmax, abstol, reltol, kp1, maxc2nrm, a, lda, k, maxc2nrmk, relmaxc2nrmk, jpiv, tau, vn1, vn2, work, info)
DLAQP2RK computes truncated QR factorization with column pivoting of a real matrix block using Level ...
subroutine dlarf1f(side, m, n, v, incv, tau, c, ldc, work)
DLARF1F applies an elementary reflector to a general rectangular