175 SUBROUTINE dlaqps( M, N, OFFSET, NB, KB, A, LDA, JPVT, TAU, VN1,
176 $ VN2, AUXV, F, LDF )
183 INTEGER KB, LDA, LDF, M, N, NB, OFFSET
187 DOUBLE PRECISION A( LDA, * ), AUXV( * ), F( LDF, * ), TAU( * ),
194 DOUBLE PRECISION ZERO, ONE
195 parameter( zero = 0.0d+0, one = 1.0d+0 )
198 INTEGER ITEMP, J, K, LASTRK, LSTICC, PVT, RK
199 DOUBLE PRECISION AKK, TEMP, TEMP2, TOL3Z
205 INTRINSIC abs, dble, max, min, nint, sqrt
209 DOUBLE PRECISION DLAMCH, DNRM2
210 EXTERNAL idamax, dlamch, dnrm2
214 lastrk = min( m, n+offset )
217 tol3z = sqrt(dlamch(
'Epsilon'))
222 IF( ( k.LT.nb ) .AND. ( lsticc.EQ.0 ) )
THEN
228 pvt = ( k-1 ) + idamax( n-k+1, vn1( k ), 1 )
230 CALL dswap( m, a( 1, pvt ), 1, a( 1, k ), 1 )
231 CALL dswap( k-1, f( pvt, 1 ), ldf, f( k, 1 ), ldf )
233 jpvt( pvt ) = jpvt( k )
235 vn1( pvt ) = vn1( k )
236 vn2( pvt ) = vn2( k )
243 CALL dgemv(
'No transpose', m-rk+1, k-1, -one, a( rk, 1 ),
244 $ lda, f( k, 1 ), ldf, one, a( rk, k ), 1 )
250 CALL dlarfg( m-rk+1, a( rk, k ), a( rk+1, k ), 1, tau( k ) )
252 CALL dlarfg( 1, a( rk, k ), a( rk, k ), 1, tau( k ) )
263 CALL dgemv(
'Transpose', m-rk+1, n-k, tau( k ),
264 $ a( rk, k+1 ), lda, a( rk, k ), 1, zero,
279 CALL dgemv(
'Transpose', m-rk+1, k-1, -tau( k ), a( rk, 1 ),
280 $ lda, a( rk, k ), 1, zero, auxv( 1 ), 1 )
282 CALL dgemv(
'No transpose', n, k-1, one, f( 1, 1 ), ldf,
283 $ auxv( 1 ), 1, one, f( 1, k ), 1 )
290 CALL dgemv(
'No transpose', n-k, k, -one, f( k+1, 1 ), ldf,
291 $ a( rk, 1 ), lda, one, a( rk, k+1 ), lda )
296 IF( rk.LT.lastrk )
THEN
298 IF( vn1( j ).NE.zero )
THEN
303 temp = abs( a( rk, j ) ) / vn1( j )
304 temp = max( zero, ( one+temp )*( one-temp ) )
305 temp2 = temp*( vn1( j ) / vn2( j ) )**2
306 IF( temp2 .LE. tol3z )
THEN
307 vn2( j ) = dble( lsticc )
310 vn1( j ) = vn1( j )*sqrt( temp )
329 IF( kb.LT.min( n, m-offset ) )
THEN
330 CALL dgemm(
'No transpose',
'Transpose', m-rk, n-kb, kb, -one,
331 $ a( rk+1, 1 ), lda, f( kb+1, 1 ), ldf, one,
332 $ a( rk+1, kb+1 ), lda )
338 IF( lsticc.GT.0 )
THEN
339 itemp = nint( vn2( lsticc ) )
340 vn1( lsticc ) = dnrm2( m-rk, a( rk+1, lsticc ), 1 )
346 vn2( lsticc ) = vn1( lsticc )
subroutine dgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
DGEMM
subroutine dgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
DGEMV
subroutine dlaqps(m, n, offset, nb, kb, a, lda, jpvt, tau, vn1, vn2, auxv, f, ldf)
DLAQPS computes a step of QR factorization with column pivoting of a real m-by-n matrix A by using BL...
subroutine dlarfg(n, alpha, x, incx, tau)
DLARFG generates an elementary reflector (Householder matrix).
subroutine dswap(n, dx, incx, dy, incy)
DSWAP