129 SUBROUTINE zungql( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
137 INTEGER INFO, K, LDA, LWORK, M, N
140 COMPLEX*16 A( lda, * ), TAU( * ), WORK( * )
147 parameter ( zero = ( 0.0d+0, 0.0d+0 ) )
151 INTEGER I, IB, IINFO, IWS, J, KK, L, LDWORK, LWKOPT,
169 lquery = ( lwork.EQ.-1 )
172 ELSE IF( n.LT.0 .OR. n.GT.m )
THEN
174 ELSE IF( k.LT.0 .OR. k.GT.n )
THEN
176 ELSE IF( lda.LT.max( 1, m ) )
THEN
184 nb = ilaenv( 1,
'ZUNGQL',
' ', m, n, k, -1 )
189 IF( lwork.LT.max( 1, n ) .AND. .NOT.lquery )
THEN
195 CALL xerbla(
'ZUNGQL', -info )
197 ELSE IF( lquery )
THEN
210 IF( nb.GT.1 .AND. nb.LT.k )
THEN
214 nx = max( 0, ilaenv( 3,
'ZUNGQL',
' ', m, n, k, -1 ) )
221 IF( lwork.LT.iws )
THEN
227 nbmin = max( 2, ilaenv( 2,
'ZUNGQL',
' ', m, n, k, -1 ) )
232 IF( nb.GE.nbmin .AND. nb.LT.k .AND. nx.LT.k )
THEN
237 kk = min( k, ( ( k-nx+nb-1 ) / nb )*nb )
242 DO 10 i = m - kk + 1, m
252 CALL zung2l( m-kk, n-kk, k-kk, a, lda, tau, work, iinfo )
258 DO 50 i = k - kk + 1, k, nb
259 ib = min( nb, k-i+1 )
260 IF( n-k+i.GT.1 )
THEN
265 CALL zlarft(
'Backward',
'Columnwise', m-k+i+ib-1, ib,
266 $ a( 1, n-k+i ), lda, tau( i ), work, ldwork )
270 CALL zlarfb(
'Left',
'No transpose',
'Backward',
271 $
'Columnwise', m-k+i+ib-1, n-k+i-1, ib,
272 $ a( 1, n-k+i ), lda, work, ldwork, a, lda,
273 $ work( ib+1 ), ldwork )
278 CALL zung2l( m-k+i+ib-1, ib, ib, a( 1, n-k+i ), lda,
279 $ tau( i ), work, iinfo )
283 DO 40 j = n - k + i, n - k + i + ib - 1
284 DO 30 l = m - k + i + ib, m
subroutine zungql(M, N, K, A, LDA, TAU, WORK, LWORK, INFO)
ZUNGQL
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 zung2l(M, N, K, A, LDA, TAU, WORK, INFO)
ZUNG2L generates all or part of the unitary matrix Q from a QL factorization determined by cgeqlf (un...
subroutine zlarft(DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT)
ZLARFT forms the triangular factor T of a block reflector H = I - vtvH