127 SUBROUTINE zungrq( 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, II, IINFO, IWS, J, KK, L, LDWORK,
149 $ LWKOPT, NB, NBMIN, NX
166 lquery = ( lwork.EQ.-1 )
169 ELSE IF( n.LT.m )
THEN
171 ELSE IF( k.LT.0 .OR. k.GT.m )
THEN
173 ELSE IF( lda.LT.max( 1, m ) )
THEN
181 nb = ilaenv( 1,
'ZUNGRQ',
' ', m, n, k, -1 )
186 IF( lwork.LT.max( 1, m ) .AND. .NOT.lquery )
THEN
192 CALL xerbla(
'ZUNGRQ', -info )
194 ELSE IF( lquery )
THEN
207 IF( nb.GT.1 .AND. nb.LT.k )
THEN
211 nx = max( 0, ilaenv( 3,
'ZUNGRQ',
' ', m, n, k, -1 ) )
218 IF( lwork.LT.iws )
THEN
224 nbmin = max( 2, ilaenv( 2,
'ZUNGRQ',
' ', 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 )
238 DO 20 j = n - kk + 1, n
249 CALL zungr2( 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 )
263 CALL zlarft(
'Backward',
'Rowwise', n-k+i+ib-1, ib,
264 $ a( ii, 1 ), lda, tau( i ), work, ldwork )
268 CALL zlarfb(
'Right',
'Conjugate transpose',
'Backward',
269 $
'Rowwise', ii-1, n-k+i+ib-1, ib, a( ii, 1 ),
270 $ lda, work, ldwork, a, lda, work( ib+1 ),
276 CALL zungr2( ib, n-k+i+ib-1, ib, a( ii, 1 ), lda, tau( i ),
281 DO 40 l = n - k + i + ib, n
282 DO 30 j = ii, ii + 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 zungr2(m, n, k, a, lda, tau, work, info)
ZUNGR2 generates all or part of the unitary matrix Q from an RQ factorization determined by cgerqf (u...
subroutine zungrq(m, n, k, a, lda, tau, work, lwork, info)
ZUNGRQ