143 SUBROUTINE dgeqrf( M, N, A, LDA, TAU, WORK, LWORK, INFO )
150 INTEGER INFO, LDA, LWORK, M, N
153 DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
160 INTEGER I, IB, IINFO, IWS, K, LDWORK, LWKOPT, NB,
179 nb = ilaenv( 1,
'DGEQRF',
' ', m, n, -1, -1 )
180 lquery = ( lwork.EQ.-1 )
183 ELSE IF( n.LT.0 )
THEN
185 ELSE IF( lda.LT.max( 1, m ) )
THEN
187 ELSE IF( .NOT.lquery )
THEN
188 IF( lwork.LE.0 .OR. ( m.GT.0 .AND. lwork.LT.max( 1, n ) ) )
192 CALL xerbla(
'DGEQRF', -info )
194 ELSE IF( lquery )
THEN
214 IF( nb.GT.1 .AND. nb.LT.k )
THEN
218 nx = max( 0, ilaenv( 3,
'DGEQRF',
' ', m, n, -1, -1 ) )
225 IF( lwork.LT.iws )
THEN
231 nbmin = max( 2, ilaenv( 2,
'DGEQRF',
' ', m, n, -1,
237 IF( nb.GE.nbmin .AND. nb.LT.k .AND. nx.LT.k )
THEN
241 DO 10 i = 1, k - nx, nb
242 ib = min( k-i+1, nb )
247 CALL dgeqr2( m-i+1, ib, a( i, i ), lda, tau( i ), work,
254 CALL dlarft(
'Forward',
'Columnwise', m-i+1, ib,
255 $ a( i, i ), lda, tau( i ), work, ldwork )
259 CALL dlarfb(
'Left',
'Transpose',
'Forward',
260 $
'Columnwise', m-i+1, n-i-ib+1, ib,
261 $ a( i, i ), lda, work, ldwork, a( i, i+ib ),
262 $ lda, work( ib+1 ), ldwork )
272 $
CALL dgeqr2( m-i+1, n-i+1, a( i, i ), lda, tau( i ), work,
subroutine dgeqr2(m, n, a, lda, tau, work, info)
DGEQR2 computes the QR factorization of a general rectangular matrix using an unblocked algorithm.
subroutine dgeqrf(m, n, a, lda, tau, work, lwork, info)
DGEQRF
subroutine dlarfb(side, trans, direct, storev, m, n, k, v, ldv, t, ldt, c, ldc, work, ldwork)
DLARFB applies a block reflector or its transpose to a general rectangular matrix.
recursive subroutine dlarft(direct, storev, n, k, v, ldv, tau, t, ldt)
DLARFT forms the triangular factor T of a block reflector H = I - vtvH