176 SUBROUTINE slaqps( 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 A( LDA, * ), AUXV( * ), F( LDF, * ), TAU( * ),
196 parameter( zero = 0.0e+0, one = 1.0e+0 )
199 INTEGER ITEMP, J, K, LASTRK, LSTICC, PVT, RK
200 REAL AKK, TEMP, TEMP2, TOL3Z
206 INTRINSIC abs, max, min, nint, real, sqrt
211 EXTERNAL isamax, slamch, snrm2
215 lastrk = min( m, n+offset )
218 tol3z = sqrt(slamch(
'Epsilon'))
223 IF( ( k.LT.nb ) .AND. ( lsticc.EQ.0 ) )
THEN
229 pvt = ( k-1 ) + isamax( n-k+1, vn1( k ), 1 )
231 CALL sswap( m, a( 1, pvt ), 1, a( 1, k ), 1 )
232 CALL sswap( k-1, f( pvt, 1 ), ldf, f( k, 1 ), ldf )
234 jpvt( pvt ) = jpvt( k )
236 vn1( pvt ) = vn1( k )
237 vn2( pvt ) = vn2( k )
244 CALL sgemv(
'No transpose', m-rk+1, k-1, -one, a( rk, 1 ),
245 $ lda, f( k, 1 ), ldf, one, a( rk, k ), 1 )
251 CALL slarfg( m-rk+1, a( rk, k ), a( rk+1, k ), 1, tau( k ) )
253 CALL slarfg( 1, a( rk, k ), a( rk, k ), 1, tau( k ) )
264 CALL sgemv(
'Transpose', m-rk+1, n-k, tau( k ),
265 $ a( rk, k+1 ), lda, a( rk, k ), 1, zero,
280 CALL sgemv(
'Transpose', m-rk+1, k-1, -tau( k ), a( rk, 1 ),
281 $ lda, a( rk, k ), 1, zero, auxv( 1 ), 1 )
283 CALL sgemv(
'No transpose', n, k-1, one, f( 1, 1 ), ldf,
284 $ auxv( 1 ), 1, one, f( 1, k ), 1 )
291 CALL sgemv(
'No transpose', n-k, k, -one, f( k+1, 1 ), ldf,
292 $ a( rk, 1 ), lda, one, a( rk, k+1 ), lda )
297 IF( rk.LT.lastrk )
THEN
299 IF( vn1( j ).NE.zero )
THEN
304 temp = abs( a( rk, j ) ) / vn1( j )
305 temp = max( zero, ( one+temp )*( one-temp ) )
306 temp2 = temp*( vn1( j ) / vn2( j ) )**2
307 IF( temp2 .LE. tol3z )
THEN
308 vn2( j ) = real( lsticc )
311 vn1( j ) = vn1( j )*sqrt( temp )
330 IF( kb.LT.min( n, m-offset ) )
THEN
331 CALL sgemm(
'No transpose',
'Transpose', m-rk, n-kb, kb, -one,
332 $ a( rk+1, 1 ), lda, f( kb+1, 1 ), ldf, one,
333 $ a( rk+1, kb+1 ), lda )
339 IF( lsticc.GT.0 )
THEN
340 itemp = nint( vn2( lsticc ) )
341 vn1( lsticc ) = snrm2( m-rk, a( rk+1, lsticc ), 1 )
347 vn2( lsticc ) = vn1( lsticc )
subroutine sgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
SGEMM
subroutine sgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
SGEMV
subroutine slaqps(m, n, offset, nb, kb, a, lda, jpvt, tau, vn1, vn2, auxv, f, ldf)
SLAQPS computes a step of QR factorization with column pivoting of a real m-by-n matrix A by using BL...
subroutine slarfg(n, alpha, x, incx, tau)
SLARFG generates an elementary reflector (Householder matrix).
subroutine sswap(n, sx, incx, sy, incy)
SSWAP