126 SUBROUTINE zunglq( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
133 INTEGER INFO, K, LDA, LWORK, M, N
136 COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
143 parameter( zero = ( 0.0d+0, 0.0d+0 ) )
147 INTEGER I, IB, IINFO, IWS, J, KI, KK, L, LDWORK,
148 $ LWKOPT, NB, NBMIN, NX
165 nb = ilaenv( 1,
'ZUNGLQ',
' ', m, n, k, -1 )
166 lwkopt = max( 1, m )*nb
168 lquery = ( lwork.EQ.-1 )
171 ELSE IF( n.LT.m )
THEN
173 ELSE IF( k.LT.0 .OR. k.GT.m )
THEN
175 ELSE IF( lda.LT.max( 1, m ) )
THEN
177 ELSE IF( lwork.LT.max( 1, m ) .AND. .NOT.lquery )
THEN
181 CALL xerbla(
'ZUNGLQ', -info )
183 ELSE IF( lquery )
THEN
197 IF( nb.GT.1 .AND. nb.LT.k )
THEN
201 nx = max( 0, ilaenv( 3,
'ZUNGLQ',
' ', m, n, k, -1 ) )
208 IF( lwork.LT.iws )
THEN
214 nbmin = max( 2, ilaenv( 2,
'ZUNGLQ',
' ', m, n, k, -1 ) )
219 IF( nb.GE.nbmin .AND. nb.LT.k .AND. nx.LT.k )
THEN
224 ki = ( ( k-nx-1 ) / nb )*nb
241 $
CALL zungl2( m-kk, n-kk, k-kk, a( kk+1, kk+1 ), lda,
242 $ tau( kk+1 ), work, iinfo )
248 DO 50 i = ki + 1, 1, -nb
249 ib = min( nb, k-i+1 )
255 CALL zlarft(
'Forward',
'Rowwise', n-i+1, ib, a( i, i ),
256 $ lda, tau( i ), work, ldwork )
260 CALL zlarfb(
'Right',
'Conjugate transpose',
'Forward',
261 $
'Rowwise', m-i-ib+1, n-i+1, ib, a( i, i ),
262 $ lda, work, ldwork, a( i+ib, i ), lda,
263 $ work( ib+1 ), ldwork )
268 CALL zungl2( ib, n-i+1, ib, a( i, i ), lda, tau( i ), work,
274 DO 30 l = i, i + ib - 1
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 zungl2(m, n, k, a, lda, tau, work, info)
ZUNGL2 generates all or part of the unitary matrix Q from an LQ factorization determined by cgelqf (u...
subroutine zunglq(m, n, k, a, lda, tau, work, lwork, info)
ZUNGLQ