125 SUBROUTINE zungql( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
132 INTEGER INFO, K, LDA, LWORK, M, N
135 COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
142 parameter( zero = ( 0.0d+0, 0.0d+0 ) )
146 INTEGER I, IB, IINFO, IWS, J, KK, L, LDWORK, LWKOPT,
164 lquery = ( lwork.EQ.-1 )
167 ELSE IF( n.LT.0 .OR. n.GT.m )
THEN
169 ELSE IF( k.LT.0 .OR. k.GT.n )
THEN
171 ELSE IF( lda.LT.max( 1, m ) )
THEN
179 nb = ilaenv( 1,
'ZUNGQL',
' ', m, n, k, -1 )
184 IF( lwork.LT.max( 1, n ) .AND. .NOT.lquery )
THEN
190 CALL xerbla(
'ZUNGQL', -info )
192 ELSE IF( lquery )
THEN
205 IF( nb.GT.1 .AND. nb.LT.k )
THEN
209 nx = max( 0, ilaenv( 3,
'ZUNGQL',
' ', m, n, k, -1 ) )
216 IF( lwork.LT.iws )
THEN
222 nbmin = max( 2, ilaenv( 2,
'ZUNGQL',
' ', m, n, k,
228 IF( nb.GE.nbmin .AND. nb.LT.k .AND. nx.LT.k )
THEN
233 kk = min( k, ( ( k-nx+nb-1 ) / nb )*nb )
238 DO 10 i = m - kk + 1, m
248 CALL zung2l( m-kk, n-kk, k-kk, a, lda, tau, work, iinfo )
254 DO 50 i = k - kk + 1, k, nb
255 ib = min( nb, k-i+1 )
256 IF( n-k+i.GT.1 )
THEN
261 CALL zlarft(
'Backward',
'Columnwise', m-k+i+ib-1, ib,
262 $ a( 1, n-k+i ), lda, tau( i ), work, ldwork )
266 CALL zlarfb(
'Left',
'No transpose',
'Backward',
267 $
'Columnwise', m-k+i+ib-1, n-k+i-1, ib,
268 $ a( 1, n-k+i ), lda, work, ldwork, a, lda,
269 $ work( ib+1 ), ldwork )
274 CALL zung2l( m-k+i+ib-1, ib, ib, a( 1, n-k+i ), lda,
275 $ tau( i ), work, iinfo )
279 DO 40 j = n - k + i, n - k + i + ib - 1
280 DO 30 l = m - k + i + ib, m
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.
recursive 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 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 zungql(m, n, k, a, lda, tau, work, lwork, info)
ZUNGQL