142 SUBROUTINE zgelqf( M, N, A, LDA, TAU, WORK, LWORK, INFO )
149 INTEGER INFO, LDA, LWORK, M, N
152 COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
159 INTEGER I, IB, IINFO, IWS, K, LDWORK, LWKOPT, NB,
177 nb = ilaenv( 1,
'ZGELQF',
' ', 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(
'ZGELQF', -info )
193 ELSE IF( lquery )
THEN
208 IF( nb.GT.1 .AND. nb.LT.k )
THEN
212 nx = max( 0, ilaenv( 3,
'ZGELQF',
' ', m, n, -1, -1 ) )
219 IF( lwork.LT.iws )
THEN
225 nbmin = max( 2, ilaenv( 2,
'ZGELQF',
' ', 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 zgelq2( ib, n-i+1, a( i, i ), lda, tau( i ), work,
248 CALL zlarft(
'Forward',
'Rowwise', n-i+1, ib, a( i, i ),
249 $ lda, tau( i ), work, ldwork )
253 CALL zlarfb(
'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 zgelq2( m-i+1, n-i+1, a( i, i ), lda, tau( i ), work,
subroutine xerbla(srname, info)
subroutine zgelq2(m, n, a, lda, tau, work, info)
ZGELQ2 computes the LQ factorization of a general rectangular matrix using an unblocked algorithm.
subroutine zgelqf(m, n, a, lda, tau, work, lwork, info)
ZGELQF
subroutine zlarfb(side, trans, direct, storev, m, n, k, v, ldv, t, ldt, c, ldc, work, ldwork)
ZLARFB applies a block reflector or its conjugate-transpose to a general rectangular matrix.
subroutine zlarft(direct, storev, n, k, v, ldv, tau, t, ldt)
ZLARFT forms the triangular factor T of a block reflector H = I - vtvH