165 SUBROUTINE zunmlq( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
166 $ WORK, LWORK, INFO )
173 CHARACTER SIDE, TRANS
174 INTEGER INFO, K, LDA, LDC, LWORK, M, N
177 COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
183 INTEGER NBMAX, LDT, TSIZE
184 parameter( nbmax = 64, ldt = nbmax+1,
185 $ tsize = ldt*nbmax )
188 LOGICAL LEFT, LQUERY, NOTRAN
190 INTEGER I, I1, I2, I3, IB, IC, IINFO, IWT, JC, LDWORK,
191 $ lwkopt, mi, nb, nbmin, ni, nq, nw
196 EXTERNAL lsame, ilaenv
209 left = lsame( side,
'L' )
210 notran = lsame( trans,
'N' )
211 lquery = ( lwork.EQ.-1 )
222 IF( .NOT.left .AND. .NOT.lsame( side,
'R' ) )
THEN
224 ELSE IF( .NOT.notran .AND. .NOT.lsame( trans,
'C' ) )
THEN
226 ELSE IF( m.LT.0 )
THEN
228 ELSE IF( n.LT.0 )
THEN
230 ELSE IF( k.LT.0 .OR. k.GT.nq )
THEN
232 ELSE IF( lda.LT.max( 1, k ) )
THEN
234 ELSE IF( ldc.LT.max( 1, m ) )
THEN
236 ELSE IF( lwork.LT.nw .AND. .NOT.lquery )
THEN
244 nb = min( nbmax, ilaenv( 1,
'ZUNMLQ', side // trans, m, n, k,
246 lwkopt = nw*nb + tsize
251 CALL xerbla(
'ZUNMLQ', -info )
253 ELSE IF( lquery )
THEN
259 IF( m.EQ.0 .OR. n.EQ.0 .OR. k.EQ.0 )
THEN
266 IF( nb.GT.1 .AND. nb.LT.k )
THEN
267 IF( lwork.LT.lwkopt )
THEN
268 nb = (lwork-tsize) / ldwork
269 nbmin = max( 2, ilaenv( 2,
'ZUNMLQ', side // trans, m, n, k,
274 IF( nb.LT.nbmin .OR. nb.GE.k )
THEN
278 CALL zunml2( side, trans, m, n, k, a, lda, tau, c, ldc, work,
285 IF( ( left .AND. notran ) .OR.
286 $ ( .NOT.left .AND. .NOT.notran ) )
THEN
291 i1 = ( ( k-1 ) / nb )*nb + 1
311 ib = min( nb, k-i+1 )
316 CALL zlarft(
'Forward',
'Rowwise', nq-i+1, ib, a( i, i ),
317 $ lda, tau( i ), work( iwt ), ldt )
334 CALL zlarfb( side, transt,
'Forward',
'Rowwise', mi, ni, ib,
335 $ a( i, i ), lda, work( iwt ), ldt,
336 $ c( ic, jc ), ldc, work, ldwork )
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 zunml2(side, trans, m, n, k, a, lda, tau, c, ldc, work, info)
ZUNML2 multiplies a general matrix by the unitary matrix from a LQ factorization determined by cgelqf...
subroutine zunmlq(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
ZUNMLQ