330 SUBROUTINE slaqp2rk( 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 REAL ABSTOL, MAXC2NRM, MAXC2NRMK, RELMAXC2NRMK,
347 REAL A( LDA, * ), TAU( * ), VN1( * ), VN2( * ),
355 PARAMETER ( ZERO = 0.0e+0, one = 1.0e+0 )
358 INTEGER I, ITEMP, J, JMAXC2NRM, KK, KP, MINMNFACT,
360 REAL HUGEVAL, TEMP, TEMP2, TOL3Z
366 INTRINSIC abs, max, min, sqrt
372 EXTERNAL sisnan, slamch, isamax, snrm2
388 minmnfact = min( m-ioffset, n )
389 minmnupdt = min( m-ioffset, n+nrhs )
390 kmax = min( kmax, minmnfact )
391 tol3z = sqrt( slamch(
'Epsilon' ) )
392 hugeval = slamch(
'Overflow' )
421 kp = ( kk-1 ) + isamax( n-kk+1, vn1( kk ), 1 )
428 maxc2nrmk = vn1( kp )
440 IF( sisnan( 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 sswap( 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 slarfg( m-i+1, a( i, kk ), a( i+1, kk ), 1,
586 IF( sisnan( tau(kk) ) )
THEN
592 maxc2nrmk = tau( kk )
593 relmaxc2nrmk = tau( kk )
613 IF( kk.LT.minmnupdt )
THEN
614 CALL slarf1f(
'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 ) = snrm2( m-i, a( i+1, j ), 1 )
650 vn1( j ) = vn1( j )*sqrt( temp )
672 IF( k.LT.minmnfact )
THEN
674 jmaxc2nrm = k + isamax( n-k, vn1( k+1 ), 1 )
675 maxc2nrmk = vn1( jmaxc2nrm )
680 relmaxc2nrmk = maxc2nrmk / maxc2nrm
692 DO j = k + 1, minmnfact
subroutine slaqp2rk(m, n, nrhs, ioffset, kmax, abstol, reltol, kp1, maxc2nrm, a, lda, k, maxc2nrmk, relmaxc2nrmk, jpiv, tau, vn1, vn2, work, info)
SLAQP2RK computes truncated QR factorization with column pivoting of a real matrix block using Level ...
subroutine slarf1f(side, m, n, v, incv, tau, c, ldc, work)
SLARF1F applies an elementary reflector to a general rectangular