142 SUBROUTINE dgelqf( M, N, A, LDA, TAU, WORK, LWORK, INFO )
149 INTEGER INFO, LDA, LWORK, M, N
152 DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
159 INTEGER I, IB, IINFO, IWS, K, LDWORK, LWKOPT, NB,
177 nb = ilaenv( 1,
'DGELQF',
' ', 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( lwork.LT.max( 1, m ) .AND. .NOT.lquery )
THEN
191 CALL xerbla(
'DGELQF', -info )
193 ELSE IF( lquery )
THEN
208 IF( nb.GT.1 .AND. nb.LT.k )
THEN
212 nx = max( 0, ilaenv( 3,
'DGELQF',
' ', m, n, -1, -1 ) )
219 IF( lwork.LT.iws )
THEN
225 nbmin = max( 2, ilaenv( 2,
'DGELQF',
' ', m, n, -1,
231 IF( nb.GE.nbmin .AND. nb.LT.k .AND. nx.LT.k )
THEN
235 DO 10 i = 1, k - nx, nb
236 ib = min( k-i+1, nb )
241 CALL dgelq2( ib, n-i+1, a( i, i ), lda, tau( i ), work,
248 CALL dlarft(
'Forward',
'Rowwise', n-i+1, ib, a( i, i ),
249 $ lda, tau( i ), work, ldwork )
253 CALL dlarfb(
'Right',
'No transpose',
'Forward',
254 $
'Rowwise', m-i-ib+1, n-i+1, ib, a( i, i ),
255 $ lda, work, ldwork, a( i+ib, i ), lda,
256 $ work( ib+1 ), ldwork )
266 $
CALL dgelq2( m-i+1, n-i+1, a( i, i ), lda, tau( i ), work,
subroutine xerbla(srname, info)
subroutine dgelq2(m, n, a, lda, tau, work, info)
DGELQ2 computes the LQ factorization of a general rectangular matrix using an unblocked algorithm.
subroutine dgelqf(m, n, a, lda, tau, work, lwork, info)
DGELQF
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