137 SUBROUTINE cgeqlf( M, N, A, LDA, TAU, WORK, LWORK, INFO )
144 INTEGER INFO, LDA, LWORK, M, N
147 COMPLEX A( LDA, * ), TAU( * ), WORK( * )
154 INTEGER I, IB, IINFO, IWS, K, KI, KK, LDWORK, LWKOPT,
155 $ MU, NB, NBMIN, NU, NX
166 EXTERNAL ilaenv, sroundup_lwork
173 lquery = ( lwork.EQ.-1 )
176 ELSE IF( n.LT.0 )
THEN
178 ELSE IF( lda.LT.max( 1, m ) )
THEN
187 nb = ilaenv( 1,
'CGEQLF',
' ', m, n, -1, -1 )
190 work( 1 ) = sroundup_lwork(lwkopt)
192 IF( lwork.LT.max( 1, n ) .AND. .NOT.lquery )
THEN
198 CALL xerbla(
'CGEQLF', -info )
200 ELSE IF( lquery )
THEN
213 IF( nb.GT.1 .AND. nb.LT.k )
THEN
217 nx = max( 0, ilaenv( 3,
'CGEQLF',
' ', m, n, -1, -1 ) )
224 IF( lwork.LT.iws )
THEN
230 nbmin = max( 2, ilaenv( 2,
'CGEQLF',
' ', m, n, -1,
236 IF( nb.GE.nbmin .AND. nb.LT.k .AND. nx.LT.k )
THEN
241 ki = ( ( k-nx-1 ) / nb )*nb
244 DO 10 i = k - kk + ki + 1, k - kk + 1, -nb
245 ib = min( k-i+1, nb )
250 CALL cgeql2( m-k+i+ib-1, ib, a( 1, n-k+i ), lda, tau( i ),
252 IF( n-k+i.GT.1 )
THEN
257 CALL clarft(
'Backward',
'Columnwise', m-k+i+ib-1, ib,
258 $ a( 1, n-k+i ), lda, tau( i ), work, ldwork )
262 CALL clarfb(
'Left',
'Conjugate transpose',
'Backward',
263 $
'Columnwise', m-k+i+ib-1, n-k+i-1, ib,
264 $ a( 1, n-k+i ), lda, work, ldwork, a, lda,
265 $ work( ib+1 ), ldwork )
268 mu = m - k + i + nb - 1
269 nu = n - k + i + nb - 1
277 IF( mu.GT.0 .AND. nu.GT.0 )
278 $
CALL cgeql2( mu, nu, a, lda, tau, work, iinfo )
280 work( 1 ) = sroundup_lwork(iws)
subroutine xerbla(srname, info)
subroutine cgeql2(m, n, a, lda, tau, work, info)
CGEQL2 computes the QL factorization of a general rectangular matrix using an unblocked algorithm.
subroutine cgeqlf(m, n, a, lda, tau, work, lwork, info)
CGEQLF
subroutine clarfb(side, trans, direct, storev, m, n, k, v, ldv, t, ldt, c, ldc, work, ldwork)
CLARFB applies a block reflector or its conjugate-transpose to a general rectangular matrix.
subroutine clarft(direct, storev, n, k, v, ldv, tau, t, ldt)
CLARFT forms the triangular factor T of a block reflector H = I - vtvH