137 SUBROUTINE zgeqlf( 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, KI, KK, LDWORK, LWKOPT,
155 $ MU, NB, NBMIN, NU, NX
172 lquery = ( lwork.EQ.-1 )
175 ELSE IF( n.LT.0 )
THEN
177 ELSE IF( lda.LT.max( 1, m ) )
THEN
186 nb = ilaenv( 1,
'ZGEQLF',
' ', m, n, -1, -1 )
191 IF( lwork.LT.max( 1, n ) .AND. .NOT.lquery )
THEN
197 CALL xerbla(
'ZGEQLF', -info )
199 ELSE IF( lquery )
THEN
212 IF( nb.GT.1 .AND. nb.LT.k )
THEN
216 nx = max( 0, ilaenv( 3,
'ZGEQLF',
' ', m, n, -1, -1 ) )
223 IF( lwork.LT.iws )
THEN
229 nbmin = max( 2, ilaenv( 2,
'ZGEQLF',
' ', m, n, -1,
235 IF( nb.GE.nbmin .AND. nb.LT.k .AND. nx.LT.k )
THEN
240 ki = ( ( k-nx-1 ) / nb )*nb
243 DO 10 i = k - kk + ki + 1, k - kk + 1, -nb
244 ib = min( k-i+1, nb )
249 CALL zgeql2( m-k+i+ib-1, ib, a( 1, n-k+i ), lda, tau( i ),
251 IF( n-k+i.GT.1 )
THEN
256 CALL zlarft(
'Backward',
'Columnwise', m-k+i+ib-1, ib,
257 $ a( 1, n-k+i ), lda, tau( i ), work, ldwork )
261 CALL zlarfb(
'Left',
'Conjugate transpose',
'Backward',
262 $
'Columnwise', m-k+i+ib-1, n-k+i-1, ib,
263 $ a( 1, n-k+i ), lda, work, ldwork, a, lda,
264 $ work( ib+1 ), ldwork )
267 mu = m - k + i + nb - 1
268 nu = n - k + i + nb - 1
276 IF( mu.GT.0 .AND. nu.GT.0 )
277 $
CALL zgeql2( mu, nu, a, lda, tau, work, iinfo )
subroutine xerbla(srname, info)
subroutine zgeql2(m, n, a, lda, tau, work, info)
ZGEQL2 computes the QL factorization of a general rectangular matrix using an unblocked algorithm.
subroutine zgeqlf(m, n, a, lda, tau, work, lwork, info)
ZGEQLF
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