147 SUBROUTINE cgeqrfp( M, N, A, LDA, TAU, WORK, LWORK, INFO )
154 INTEGER INFO, LDA, LWORK, M, N
157 COMPLEX A( LDA, * ), TAU( * ), WORK( * )
164 INTEGER I, IB, IINFO, IWS, K, LDWORK, LWKMIN, LWKOPT,
176 EXTERNAL ilaenv, sroundup_lwork
183 nb = ilaenv( 1,
'CGEQRF',
' ', m, n, -1, -1 )
192 work( 1 ) = sroundup_lwork( lwkopt )
194 lquery = ( lwork.EQ.-1 )
197 ELSE IF( n.LT.0 )
THEN
199 ELSE IF( lda.LT.max( 1, m ) )
THEN
201 ELSE IF( lwork.LT.lwkmin .AND. .NOT.lquery )
THEN
205 CALL xerbla(
'CGEQRFP', -info )
207 ELSE IF( lquery )
THEN
221 IF( nb.GT.1 .AND. nb.LT.k )
THEN
225 nx = max( 0, ilaenv( 3,
'CGEQRF',
' ', m, n, -1, -1 ) )
232 IF( lwork.LT.iws )
THEN
238 nbmin = max( 2, ilaenv( 2,
'CGEQRF',
' ', m, n, -1,
244 IF( nb.GE.nbmin .AND. nb.LT.k .AND. nx.LT.k )
THEN
248 DO 10 i = 1, k - nx, nb
249 ib = min( k-i+1, nb )
254 CALL cgeqr2p( m-i+1, ib, a( i, i ), lda, tau( i ), work,
261 CALL clarft(
'Forward',
'Columnwise', m-i+1, ib,
262 $ a( i, i ), lda, tau( i ), work, ldwork )
266 CALL clarfb(
'Left',
'Conjugate transpose',
'Forward',
267 $
'Columnwise', m-i+1, n-i-ib+1, ib,
268 $ a( i, i ), lda, work, ldwork, a( i, i+ib ),
269 $ lda, work( ib+1 ), ldwork )
279 $
CALL cgeqr2p( m-i+1, n-i+1, a( i, i ), lda, tau( i ), work,
282 work( 1 ) = sroundup_lwork( iws )
subroutine cgeqr2p(m, n, a, lda, tau, work, info)
CGEQR2P computes the QR factorization of a general rectangular matrix with non-negative diagonal elem...
subroutine cgeqrfp(m, n, a, lda, tau, work, lwork, info)
CGEQRFP
subroutine clarfb(side, trans, direct, storev, m, n, k, v, ldv, t, ldt, c, ldc, work, ldwork)
CLARFB applies a block reflector or its conjugate-transpose to a general rectangular matrix.
recursive subroutine clarft(direct, storev, n, k, v, ldv, tau, t, ldt)
CLARFT forms the triangular factor T of a block reflector H = I - vtvH