145 SUBROUTINE dgeqrf( M, N, A, LDA, TAU, WORK, LWORK, INFO )
152 INTEGER INFO, LDA, LWORK, M, N
155 DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
162 INTEGER I, IB, IINFO, IWS, K, LDWORK, LWKOPT, NB,
181 nb = ilaenv( 1,
'DGEQRF',
' ', m, n, -1, -1 )
182 lquery = ( lwork.EQ.-1 )
185 ELSE IF( n.LT.0 )
THEN
187 ELSE IF( lda.LT.max( 1, m ) )
THEN
189 ELSE IF( .NOT.lquery )
THEN
190 IF( lwork.LE.0 .OR. ( m.GT.0 .AND. lwork.LT.max( 1, n ) ) )
194 CALL xerbla(
'DGEQRF', -info )
196 ELSE IF( lquery )
THEN
216 IF( nb.GT.1 .AND. nb.LT.k )
THEN
220 nx = max( 0, ilaenv( 3,
'DGEQRF',
' ', m, n, -1, -1 ) )
227 IF( lwork.LT.iws )
THEN
233 nbmin = max( 2, ilaenv( 2,
'DGEQRF',
' ', m, n, -1,
239 IF( nb.GE.nbmin .AND. nb.LT.k .AND. nx.LT.k )
THEN
243 DO 10 i = 1, k - nx, nb
244 ib = min( k-i+1, nb )
249 CALL dgeqr2( m-i+1, ib, a( i, i ), lda, tau( i ), work,
256 CALL dlarft(
'Forward',
'Columnwise', m-i+1, ib,
257 $ a( i, i ), lda, tau( i ), work, ldwork )
261 CALL dlarfb(
'Left',
'Transpose',
'Forward',
262 $
'Columnwise', m-i+1, n-i-ib+1, ib,
263 $ a( i, i ), lda, work, ldwork, a( i, i+ib ),
264 $ lda, work( ib+1 ), ldwork )
274 $
CALL dgeqr2( m-i+1, n-i+1, a( i, i ), lda, tau( i ), work,
subroutine xerbla(srname, info)
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.
subroutine dlarft(direct, storev, n, k, v, ldv, tau, t, ldt)
DLARFT forms the triangular factor T of a block reflector H = I - vtvH