147 SUBROUTINE claqp2( M, N, OFFSET, A, LDA, JPVT, TAU, VN1, VN2,
155 INTEGER LDA, M, N, OFFSET
159 REAL VN1( * ), VN2( * )
160 COMPLEX A( LDA, * ), TAU( * ), WORK( * )
168 parameter( zero = 0.0e+0, one = 1.0e+0,
169 $ cone = ( 1.0e+0, 0.0e+0 ) )
172 INTEGER I, ITEMP, J, MN, OFFPI, PVT
173 REAL TEMP, TEMP2, TOL3Z
180 INTRINSIC abs, conjg, max, min, sqrt
185 EXTERNAL isamax, scnrm2, slamch
189 mn = min( m-offset, n )
190 tol3z = sqrt(slamch(
'Epsilon'))
200 pvt = ( i-1 ) + isamax( n-i+1, vn1( i ), 1 )
203 CALL cswap( 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 clarfg( m-offpi+1, a( offpi, i ), a( offpi+1, i ), 1,
217 CALL clarfg( 1, a( m, i ), a( m, i ), 1, tau( i ) )
226 CALL clarf(
'Left', m-offpi+1, n-i, a( offpi, i ), 1,
227 $ conjg( 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 ) = scnrm2( m-offpi, a( offpi+1, j ), 1 )
252 vn1( j ) = vn1( j )*sqrt( temp )
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 clarf(side, m, n, v, incv, tau, c, ldc, work)
CLARF applies an elementary reflector to a general rectangular matrix.
subroutine clarfg(n, alpha, x, incx, tau)
CLARFG generates an elementary reflector (Householder matrix).
subroutine cswap(n, cx, incx, cy, incy)
CSWAP