331 SUBROUTINE claqp2rk( M, N, NRHS, IOFFSET, KMAX, ABSTOL, RELTOL,
332 $ KP1, MAXC2NRM, A, LDA, K, MAXC2NRMK,
333 $ RELMAXC2NRMK, JPIV, TAU, VN1, VN2, WORK,
342 INTEGER INFO, IOFFSET, KP1, K, KMAX, LDA, M, N, NRHS
343 REAL ABSTOL, MAXC2NRM, MAXC2NRMK, RELMAXC2NRMK,
348 REAL VN1( * ), VN2( * )
349 COMPLEX A( LDA, * ), TAU( * ), WORK( * )
356 PARAMETER ( ZERO = 0.0e+0, one = 1.0e+0 )
358 parameter( czero = ( 0.0e+0, 0.0e+0 ) )
361 INTEGER I, ITEMP, J, JMAXC2NRM, KK, KP, MINMNFACT,
363 REAL HUGEVAL, TAUNAN, TEMP, TEMP2, TOL3Z
369 INTRINSIC abs, real, conjg, aimag, max, min, sqrt
375 EXTERNAL sisnan, slamch, isamax, scnrm2
391 minmnfact = min( m-ioffset, n )
392 minmnupdt = min( m-ioffset, n+nrhs )
393 kmax = min( kmax, minmnfact )
394 tol3z = sqrt( slamch(
'Epsilon' ) )
395 hugeval = slamch(
'Overflow' )
423 kp = ( kk-1 ) + isamax( n-kk+1, vn1( kk ), 1 )
430 maxc2nrmk = vn1( kp )
442 IF( sisnan( maxc2nrmk ) )
THEN
452 relmaxc2nrmk = maxc2nrmk
469 IF( maxc2nrmk.EQ.zero )
THEN
501 IF( info.EQ.0 .AND. maxc2nrmk.GT.hugeval )
THEN
502 info = n + kk - 1 + kp
517 relmaxc2nrmk = maxc2nrmk / maxc2nrm
519 IF( maxc2nrmk.LE.abstol .OR. relmaxc2nrmk.LE.reltol )
THEN
558 CALL cswap( m, a( 1, kp ), 1, a( 1, kk ), 1 )
559 vn1( kp ) = vn1( kk )
560 vn2( kp ) = vn2( kk )
562 jpiv( kp ) = jpiv( kk )
572 CALL clarfg( m-i+1, a( i, kk ), a( i+1, kk ), 1,
588 IF( sisnan( real( tau(kk) ) ) )
THEN
589 taunan = real( tau(kk) )
590 ELSE IF( sisnan( aimag( tau(kk) ) ) )
THEN
591 taunan = aimag( tau(kk) )
596 IF( sisnan( taunan ) )
THEN
603 relmaxc2nrmk = taunan
623 IF( kk.LT.minmnupdt )
THEN
624 CALL clarf1f(
'Left', m-i+1, n+nrhs-kk, a( i, kk ), 1,
625 $ conjg( tau( kk ) ), a( i, kk+1 ), lda,
629 IF( kk.LT.minmnfact )
THEN
636 IF( vn1( j ).NE.zero )
THEN
641 temp = one - ( abs( a( i, j ) ) / vn1( j ) )**2
642 temp = max( temp, zero )
643 temp2 = temp*( vn1( j ) / vn2( j ) )**2
644 IF( temp2 .LE. tol3z )
THEN
651 vn1( j ) = scnrm2( m-i, a( i+1, j ), 1 )
661 vn1( j ) = vn1( j )*sqrt( temp )
683 IF( k.LT.minmnfact )
THEN
685 jmaxc2nrm = k + isamax( n-k, vn1( k+1 ), 1 )
686 maxc2nrmk = vn1( jmaxc2nrm )
691 relmaxc2nrmk = maxc2nrmk / maxc2nrm
703 DO j = k + 1, minmnfact
subroutine claqp2rk(m, n, nrhs, ioffset, kmax, abstol, reltol, kp1, maxc2nrm, a, lda, k, maxc2nrmk, relmaxc2nrmk, jpiv, tau, vn1, vn2, work, info)
CLAQP2RK computes truncated QR factorization with column pivoting of a complex matrix block using Lev...