136 SUBROUTINE zgelqf( M, N, A, LDA, TAU, WORK, LWORK, INFO )
144 INTEGER INFO, LDA, LWORK, M, N
147 COMPLEX*16 A( lda, * ), TAU( * ), WORK( * )
154 INTEGER I, IB, IINFO, IWS, K, LDWORK, LWKOPT, NB,
172 nb = ilaenv( 1,
'ZGELQF',
' ', m, n, -1, -1 )
175 lquery = ( lwork.EQ.-1 )
178 ELSE IF( n.LT.0 )
THEN
180 ELSE IF( lda.LT.max( 1, m ) )
THEN
182 ELSE IF( lwork.LT.max( 1, m ) .AND. .NOT.lquery )
THEN
186 CALL xerbla(
'ZGELQF', -info )
188 ELSE IF( lquery )
THEN
203 IF( nb.GT.1 .AND. nb.LT.k )
THEN
207 nx = max( 0, ilaenv( 3,
'ZGELQF',
' ', m, n, -1, -1 ) )
214 IF( lwork.LT.iws )
THEN
220 nbmin = max( 2, ilaenv( 2,
'ZGELQF',
' ', m, n, -1,
226 IF( nb.GE.nbmin .AND. nb.LT.k .AND. nx.LT.k )
THEN
230 DO 10 i = 1, k - nx, nb
231 ib = min( k-i+1, nb )
236 CALL zgelq2( ib, n-i+1, a( i, i ), lda, tau( i ), work,
243 CALL zlarft(
'Forward',
'Rowwise', n-i+1, ib, a( i, i ),
244 $ lda, tau( i ), work, ldwork )
248 CALL zlarfb(
'Right',
'No transpose',
'Forward',
249 $
'Rowwise', m-i-ib+1, n-i+1, ib, a( i, i ),
250 $ lda, work, ldwork, a( i+ib, i ), lda,
251 $ work( ib+1 ), ldwork )
261 $
CALL zgelq2( m-i+1, n-i+1, a( i, i ), lda, tau( i ), work,
subroutine zgelq2(M, N, A, LDA, TAU, WORK, INFO)
ZGELQ2 computes the LQ factorization of a general rectangular matrix using an unblocked algorithm...
subroutine xerbla(SRNAME, INFO)
XERBLA
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
subroutine zgelqf(M, N, A, LDA, TAU, WORK, LWORK, INFO)
ZGELQF