143 SUBROUTINE claqp2( M, N, OFFSET, A, LDA, JPVT, TAU, VN1, VN2,
151 INTEGER LDA, M, N, OFFSET
155 REAL VN1( * ), VN2( * )
156 COMPLEX A( LDA, * ), TAU( * ), WORK( * )
163 parameter( zero = 0.0e+0, one = 1.0e+0 )
166 INTEGER I, ITEMP, J, MN, OFFPI, PVT
167 REAL TEMP, TEMP2, TOL3Z
173 INTRINSIC abs, conjg, max, min, sqrt
178 EXTERNAL isamax, scnrm2, slamch
182 mn = min( m-offset, n )
183 tol3z = sqrt(slamch(
'Epsilon'))
193 pvt = ( i-1 ) + isamax( n-i+1, vn1( i ), 1 )
196 CALL cswap( m, a( 1, pvt ), 1, a( 1, i ), 1 )
198 jpvt( pvt ) = jpvt( i )
200 vn1( pvt ) = vn1( i )
201 vn2( pvt ) = vn2( i )
206 IF( offpi.LT.m )
THEN
207 CALL clarfg( m-offpi+1, a( offpi, i ), a( offpi+1, i ),
211 CALL clarfg( 1, a( m, i ), a( m, i ), 1, tau( i ) )
218 CALL clarf1f(
'Left', m-offpi+1, n-i, a( offpi, i ), 1,
219 $ conjg( tau( i ) ), a( offpi, i+1 ), lda,
226 IF( vn1( j ).NE.zero )
THEN
231 temp = one - ( abs( a( offpi, j ) ) / vn1( j ) )**2
232 temp = max( temp, zero )
233 temp2 = temp*( vn1( j ) / vn2( j ) )**2
234 IF( temp2 .LE. tol3z )
THEN
235 IF( offpi.LT.m )
THEN
236 vn1( j ) = scnrm2( m-offpi, a( offpi+1, j ), 1 )
243 vn1( j ) = vn1( j )*sqrt( temp )
subroutine clarf1f(side, m, n, v, incv, tau, c, ldc, work)
CLARF1F applies an elementary reflector to a general rectangular
subroutine claqp2(m, n, offset, a, lda, jpvt, tau, vn1, vn2, work)
CLAQP2 computes a QR factorization with column pivoting of the matrix block.
subroutine clarfg(n, alpha, x, incx, tau)
CLARFG generates an elementary reflector (Householder matrix).