147 SUBROUTINE zlaqp2( M, N, OFFSET, A, LDA, JPVT, TAU, VN1, VN2,
155 INTEGER LDA, M, N, OFFSET
159 DOUBLE PRECISION VN1( * ), VN2( * )
160 COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
166 DOUBLE PRECISION ZERO, ONE
168 parameter( zero = 0.0d+0, one = 1.0d+0,
169 $ cone = ( 1.0d+0, 0.0d+0 ) )
172 INTEGER I, ITEMP, J, MN, OFFPI, PVT
173 DOUBLE PRECISION TEMP, TEMP2, TOL3Z
180 INTRINSIC abs, dconjg, max, min, sqrt
184 DOUBLE PRECISION DLAMCH, DZNRM2
185 EXTERNAL idamax, dlamch, dznrm2
189 mn = min( m-offset, n )
190 tol3z = sqrt(dlamch(
'Epsilon'))
200 pvt = ( i-1 ) + idamax( n-i+1, vn1( i ), 1 )
203 CALL zswap( m, a( 1, pvt ), 1, a( 1, i ), 1 )
205 jpvt( pvt ) = jpvt( i )
207 vn1( pvt ) = vn1( i )
208 vn2( pvt ) = vn2( i )
213 IF( offpi.LT.m )
THEN
214 CALL zlarfg( m-offpi+1, a( offpi, i ), a( offpi+1, i ), 1,
217 CALL zlarfg( 1, a( m, i ), a( m, i ), 1, tau( i ) )
226 CALL zlarf(
'Left', m-offpi+1, n-i, a( offpi, i ), 1,
227 $ dconjg( tau( i ) ), a( offpi, i+1 ), lda,
235 IF( vn1( j ).NE.zero )
THEN
240 temp = one - ( abs( a( offpi, j ) ) / vn1( j ) )**2
241 temp = max( temp, zero )
242 temp2 = temp*( vn1( j ) / vn2( j ) )**2
243 IF( temp2 .LE. tol3z )
THEN
244 IF( offpi.LT.m )
THEN
245 vn1( j ) = dznrm2( m-offpi, a( offpi+1, j ), 1 )
252 vn1( j ) = vn1( j )*sqrt( temp )
subroutine zlaqp2(m, n, offset, a, lda, jpvt, tau, vn1, vn2, work)
ZLAQP2 computes a QR factorization with column pivoting of the matrix block.
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