341 SUBROUTINE zlaqp2rk( M, N, NRHS, IOFFSET, KMAX, ABSTOL, RELTOL,
342 $ KP1, MAXC2NRM, A, LDA, K, MAXC2NRMK,
343 $ RELMAXC2NRMK, JPIV, TAU, VN1, VN2, WORK,
352 INTEGER INFO, IOFFSET, KP1, K, KMAX, LDA, M, N, NRHS
353 DOUBLE PRECISION ABSTOL, MAXC2NRM, MAXC2NRMK, RELMAXC2NRMK,
358 DOUBLE PRECISION VN1( * ), VN2( * )
359 COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
365 DOUBLE PRECISION ZERO, ONE
366 PARAMETER ( ZERO = 0.0d+0, one = 1.0d+0 )
367 COMPLEX*16 CZERO, CONE
368 parameter( czero = ( 0.0d+0, 0.0d+0 ),
369 $ cone = ( 1.0d+0, 0.0d+0 ) )
372 INTEGER I, ITEMP, J, JMAXC2NRM, KK, KP, MINMNFACT,
374 DOUBLE PRECISION HUGEVAL, TAUNAN, TEMP, TEMP2, TOL3Z
381 INTRINSIC abs, dble, dconjg, dimag, max, min, sqrt
386 DOUBLE PRECISION DLAMCH, DZNRM2
387 EXTERNAL disnan, dlamch, idamax, dznrm2
403 minmnfact = min( m-ioffset, n )
404 minmnupdt = min( m-ioffset, n+nrhs )
405 kmax = min( kmax, minmnfact )
406 tol3z = sqrt( dlamch(
'Epsilon' ) )
407 hugeval = dlamch(
'Overflow' )
435 kp = ( kk-1 ) + idamax( n-kk+1, vn1( kk ), 1 )
442 maxc2nrmk = vn1( kp )
454 IF( disnan( maxc2nrmk ) )
THEN
464 relmaxc2nrmk = maxc2nrmk
481 IF( maxc2nrmk.EQ.zero )
THEN
513 IF( info.EQ.0 .AND. maxc2nrmk.GT.hugeval )
THEN
514 info = n + kk - 1 + kp
529 relmaxc2nrmk = maxc2nrmk / maxc2nrm
531 IF( maxc2nrmk.LE.abstol .OR. relmaxc2nrmk.LE.reltol )
THEN
570 CALL zswap( m, a( 1, kp ), 1, a( 1, kk ), 1 )
571 vn1( kp ) = vn1( kk )
572 vn2( kp ) = vn2( kk )
574 jpiv( kp ) = jpiv( kk )
584 CALL zlarfg( m-i+1, a( i, kk ), a( i+1, kk ), 1,
600 IF( disnan( dble( tau(kk) ) ) )
THEN
601 taunan = dble( tau(kk) )
602 ELSE IF( disnan( dimag( tau(kk) ) ) )
THEN
603 taunan = dimag( tau(kk) )
608 IF( disnan( taunan ) )
THEN
615 relmaxc2nrmk = taunan
635 IF( kk.LT.minmnupdt )
THEN
638 CALL zlarf(
'Left', m-i+1, n+nrhs-kk, a( i, kk ), 1,
639 $ dconjg( tau( kk ) ), a( i, kk+1 ), lda,
644 IF( kk.LT.minmnfact )
THEN
651 IF( vn1( j ).NE.zero )
THEN
656 temp = one - ( abs( a( i, j ) ) / vn1( j ) )**2
657 temp = max( temp, zero )
658 temp2 = temp*( vn1( j ) / vn2( j ) )**2
659 IF( temp2 .LE. tol3z )
THEN
666 vn1( j ) = dznrm2( m-i, a( i+1, j ), 1 )
676 vn1( j ) = vn1( j )*sqrt( temp )
698 IF( k.LT.minmnfact )
THEN
700 jmaxc2nrm = k + idamax( n-k, vn1( k+1 ), 1 )
701 maxc2nrmk = vn1( jmaxc2nrm )
706 relmaxc2nrmk = maxc2nrmk / maxc2nrm
718 DO j = k + 1, minmnfact
subroutine zlarf(side, m, n, v, incv, tau, c, ldc, work)
ZLARF applies an elementary reflector to a general rectangular matrix.
subroutine zlarfg(n, alpha, x, incx, tau)
ZLARFG generates an elementary reflector (Householder matrix).
subroutine zswap(n, zx, incx, zy, incy)
ZSWAP
subroutine zlaqp2rk(m, n, nrhs, ioffset, kmax, abstol, reltol, kp1, maxc2nrm, a, lda, k, maxc2nrmk, relmaxc2nrmk, jpiv, tau, vn1, vn2, work, info)
ZLAQP2RK computes truncated QR factorization with column pivoting of a complex matrix block using Lev...