176 SUBROUTINE claqps( M, N, OFFSET, NB, KB, A, LDA, JPVT, TAU, VN1,
177 $ VN2, AUXV, F, LDF )
184 INTEGER KB, LDA, LDF, M, N, NB, OFFSET
188 REAL VN1( * ), VN2( * )
189 COMPLEX A( LDA, * ), AUXV( * ), F( LDF, * ), TAU( * )
197 parameter( zero = 0.0e+0, one = 1.0e+0,
198 $ czero = ( 0.0e+0, 0.0e+0 ),
199 $ cone = ( 1.0e+0, 0.0e+0 ) )
202 INTEGER ITEMP, J, K, LASTRK, LSTICC, PVT, RK
203 REAL TEMP, TEMP2, TOL3Z
210 INTRINSIC abs, conjg, max, min, nint, real, sqrt
215 EXTERNAL isamax, scnrm2, slamch
219 lastrk = min( m, n+offset )
222 tol3z = sqrt(slamch(
'Epsilon'))
227 IF( ( k.LT.nb ) .AND. ( lsticc.EQ.0 ) )
THEN
233 pvt = ( k-1 ) + isamax( n-k+1, vn1( k ), 1 )
235 CALL cswap( m, a( 1, pvt ), 1, a( 1, k ), 1 )
236 CALL cswap( k-1, f( pvt, 1 ), ldf, f( k, 1 ), ldf )
238 jpvt( pvt ) = jpvt( k )
240 vn1( pvt ) = vn1( k )
241 vn2( pvt ) = vn2( k )
249 f( k, j ) = conjg( f( k, j ) )
251 CALL cgemv(
'No transpose', m-rk+1, k-1, -cone, a( rk, 1 ),
252 $ lda, f( k, 1 ), ldf, cone, a( rk, k ), 1 )
254 f( k, j ) = conjg( f( k, j ) )
261 CALL clarfg( m-rk+1, a( rk, k ), a( rk+1, k ), 1, tau( k ) )
263 CALL clarfg( 1, a( rk, k ), a( rk, k ), 1, tau( k ) )
274 CALL cgemv(
'Conjugate transpose', m-rk+1, n-k, tau( k ),
275 $ a( rk, k+1 ), lda, a( rk, k ), 1, czero,
290 CALL cgemv(
'Conjugate transpose', m-rk+1, k-1, -tau( k ),
291 $ a( rk, 1 ), lda, a( rk, k ), 1, czero,
294 CALL cgemv(
'No transpose', n, k-1, cone, f( 1, 1 ), ldf,
295 $ auxv( 1 ), 1, cone, f( 1, k ), 1 )
302 CALL cgemm(
'No transpose',
'Conjugate transpose', 1, n-k,
303 $ k, -cone, a( rk, 1 ), lda, f( k+1, 1 ), ldf,
304 $ cone, a( rk, k+1 ), lda )
309 IF( rk.LT.lastrk )
THEN
311 IF( vn1( j ).NE.zero )
THEN
316 temp = abs( a( rk, j ) ) / vn1( j )
317 temp = max( zero, ( one+temp )*( one-temp ) )
318 temp2 = temp*( vn1( j ) / vn2( j ) )**2
319 IF( temp2 .LE. tol3z )
THEN
320 vn2( j ) = real( lsticc )
323 vn1( j ) = vn1( j )*sqrt( temp )
342 IF( kb.LT.min( n, m-offset ) )
THEN
343 CALL cgemm(
'No transpose',
'Conjugate transpose', m-rk, n-kb,
344 $ kb, -cone, a( rk+1, 1 ), lda, f( kb+1, 1 ), ldf,
345 $ cone, a( rk+1, kb+1 ), lda )
351 IF( lsticc.GT.0 )
THEN
352 itemp = nint( vn2( lsticc ) )
353 vn1( lsticc ) = scnrm2( m-rk, a( rk+1, lsticc ), 1 )
359 vn2( lsticc ) = vn1( lsticc )
subroutine cgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
CGEMM
subroutine cgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
CGEMV
subroutine claqps(m, n, offset, nb, kb, a, lda, jpvt, tau, vn1, vn2, auxv, f, ldf)
CLAQPS computes a step of QR factorization with column pivoting of a real m-by-n matrix A by using BL...
subroutine clarfg(n, alpha, x, incx, tau)
CLARFG generates an elementary reflector (Householder matrix).
subroutine cswap(n, cx, incx, cy, incy)
CSWAP