127 SUBROUTINE zungql( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
134 INTEGER INFO, K, LDA, LWORK, M, N
137 COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
144 parameter( zero = ( 0.0d+0, 0.0d+0 ) )
148 INTEGER I, IB, IINFO, IWS, J, KK, L, LDWORK, LWKOPT,
166 lquery = ( lwork.EQ.-1 )
169 ELSE IF( n.LT.0 .OR. n.GT.m )
THEN
171 ELSE IF( k.LT.0 .OR. k.GT.n )
THEN
173 ELSE IF( lda.LT.max( 1, m ) )
THEN
181 nb = ilaenv( 1,
'ZUNGQL',
' ', m, n, k, -1 )
186 IF( lwork.LT.max( 1, n ) .AND. .NOT.lquery )
THEN
192 CALL xerbla(
'ZUNGQL', -info )
194 ELSE IF( lquery )
THEN
207 IF( nb.GT.1 .AND. nb.LT.k )
THEN
211 nx = max( 0, ilaenv( 3,
'ZUNGQL',
' ', m, n, k, -1 ) )
218 IF( lwork.LT.iws )
THEN
224 nbmin = max( 2, ilaenv( 2,
'ZUNGQL',
' ', m, n, k, -1 ) )
229 IF( nb.GE.nbmin .AND. nb.LT.k .AND. nx.LT.k )
THEN
234 kk = min( k, ( ( k-nx+nb-1 ) / nb )*nb )
239 DO 10 i = m - kk + 1, m
249 CALL zung2l( m-kk, n-kk, k-kk, a, lda, tau, work, iinfo )
255 DO 50 i = k - kk + 1, k, nb
256 ib = min( nb, k-i+1 )
257 IF( n-k+i.GT.1 )
THEN
262 CALL zlarft(
'Backward',
'Columnwise', m-k+i+ib-1, ib,
263 $ a( 1, n-k+i ), lda, tau( i ), work, ldwork )
267 CALL zlarfb(
'Left',
'No transpose',
'Backward',
268 $
'Columnwise', m-k+i+ib-1, n-k+i-1, ib,
269 $ a( 1, n-k+i ), lda, work, ldwork, a, lda,
270 $ work( ib+1 ), ldwork )
275 CALL zung2l( m-k+i+ib-1, ib, ib, a( 1, n-k+i ), lda,
276 $ tau( i ), work, iinfo )
280 DO 40 j = n - k + i, n - k + i + ib - 1
281 DO 30 l = m - k + i + ib, m
subroutine xerbla(srname, info)
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 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