147 SUBROUTINE sgeqrfp( M, N, A, LDA, TAU, WORK, LWORK, INFO )
154 INTEGER INFO, LDA, LWORK, M, N
157 REAL A( LDA, * ), TAU( * ), WORK( * )
164 INTEGER I, IB, IINFO, IWS, K, LDWORK, LWKMIN, LWKOPT,
177 EXTERNAL sroundup_lwork
184 nb = ilaenv( 1,
'SGEQRF',
' ', m, n, -1, -1 )
193 work( 1 ) = sroundup_lwork( lwkopt )
195 lquery = ( lwork.EQ.-1 )
198 ELSE IF( n.LT.0 )
THEN
200 ELSE IF( lda.LT.max( 1, m ) )
THEN
202 ELSE IF( lwork.LT.lwkmin .AND. .NOT.lquery )
THEN
206 CALL xerbla(
'SGEQRFP', -info )
208 ELSE IF( lquery )
THEN
223 IF( nb.GT.1 .AND. nb.LT.k )
THEN
227 nx = max( 0, ilaenv( 3,
'SGEQRF',
' ', m, n, -1, -1 ) )
234 IF( lwork.LT.iws )
THEN
240 nbmin = max( 2, ilaenv( 2,
'SGEQRF',
' ', m, n, -1,
246 IF( nb.GE.nbmin .AND. nb.LT.k .AND. nx.LT.k )
THEN
250 DO 10 i = 1, k - nx, nb
251 ib = min( k-i+1, nb )
256 CALL sgeqr2p( m-i+1, ib, a( i, i ), lda, tau( i ), work,
263 CALL slarft(
'Forward',
'Columnwise', m-i+1, ib,
264 $ a( i, i ), lda, tau( i ), work, ldwork )
268 CALL slarfb(
'Left',
'Transpose',
'Forward',
269 $
'Columnwise', m-i+1, n-i-ib+1, ib,
270 $ a( i, i ), lda, work, ldwork, a( i, i+ib ),
271 $ lda, work( ib+1 ), ldwork )
281 $
CALL sgeqr2p( m-i+1, n-i+1, a( i, i ), lda, tau( i ), work,
284 work( 1 ) = sroundup_lwork( iws )
subroutine sgeqr2p(m, n, a, lda, tau, work, info)
SGEQR2P computes the QR factorization of a general rectangular matrix with non-negative diagonal elem...
subroutine sgeqrfp(m, n, a, lda, tau, work, lwork, info)
SGEQRFP
subroutine slarfb(side, trans, direct, storev, m, n, k, v, ldv, t, ldt, c, ldc, work, ldwork)
SLARFB applies a block reflector or its transpose to a general rectangular matrix.
recursive subroutine slarft(direct, storev, n, k, v, ldv, tau, t, ldt)
SLARFT forms the triangular factor T of a block reflector H = I - vtvH