166 SUBROUTINE cunmql( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
167 $ WORK, LWORK, INFO )
174 CHARACTER SIDE, TRANS
175 INTEGER INFO, K, LDA, LDC, LWORK, M, N
178 COMPLEX A( LDA, * ), C( LDC, * ), TAU( * ),
185 INTEGER NBMAX, LDT, TSIZE
186 parameter( nbmax = 64, ldt = nbmax+1,
187 $ tsize = ldt*nbmax )
190 LOGICAL LEFT, LQUERY, NOTRAN
191 INTEGER I, I1, I2, I3, IB, IINFO, IWT, LDWORK, LWKOPT,
192 $ mi, nb, nbmin, ni, nq, nw
198 EXTERNAL lsame, ilaenv, sroundup_lwork
211 left = lsame( side,
'L' )
212 notran = lsame( trans,
'N' )
213 lquery = ( lwork.EQ.-1 )
224 IF( .NOT.left .AND. .NOT.lsame( side,
'R' ) )
THEN
226 ELSE IF( .NOT.notran .AND. .NOT.lsame( trans,
'C' ) )
THEN
228 ELSE IF( m.LT.0 )
THEN
230 ELSE IF( n.LT.0 )
THEN
232 ELSE IF( k.LT.0 .OR. k.GT.nq )
THEN
234 ELSE IF( lda.LT.max( 1, nq ) )
THEN
236 ELSE IF( ldc.LT.max( 1, m ) )
THEN
238 ELSE IF( lwork.LT.nw .AND. .NOT.lquery )
THEN
246 IF( m.EQ.0 .OR. n.EQ.0 )
THEN
249 nb = min( nbmax, ilaenv( 1,
'CUNMQL', side // trans, m, n,
251 lwkopt = nw*nb + tsize
253 work( 1 ) = sroundup_lwork(lwkopt)
257 CALL xerbla(
'CUNMQL', -info )
259 ELSE IF( lquery )
THEN
265 IF( m.EQ.0 .OR. n.EQ.0 )
THEN
273 IF( nb.GT.1 .AND. nb.LT.k )
THEN
274 IF( lwork.LT.lwkopt )
THEN
275 nb = (lwork-tsize) / ldwork
276 nbmin = max( 2, ilaenv( 2,
'CUNMQL', side // trans, m, n, k,
281 IF( nb.LT.nbmin .OR. nb.GE.k )
THEN
285 CALL cunm2l( side, trans, m, n, k, a, lda, tau, c, ldc, work,
292 IF( ( left .AND. notran ) .OR.
293 $ ( .NOT.left .AND. .NOT.notran ) )
THEN
298 i1 = ( ( k-1 ) / nb )*nb + 1
310 ib = min( nb, k-i+1 )
315 CALL clarft(
'Backward',
'Columnwise', nq-k+i+ib-1, ib,
316 $ a( 1, i ), lda, tau( i ), work( iwt ), ldt )
321 mi = m - k + i + ib - 1
326 ni = n - k + i + ib - 1
331 CALL clarfb( side, trans,
'Backward',
'Columnwise', mi, ni,
332 $ ib, a( 1, i ), lda, work( iwt ), ldt, c, ldc,
336 work( 1 ) = sroundup_lwork(lwkopt)
subroutine xerbla(srname, info)
subroutine clarfb(side, trans, direct, storev, m, n, k, v, ldv, t, ldt, c, ldc, work, ldwork)
CLARFB applies a block reflector or its conjugate-transpose to a general rectangular matrix.
subroutine clarft(direct, storev, n, k, v, ldv, tau, t, ldt)
CLARFT forms the triangular factor T of a block reflector H = I - vtvH
subroutine cunm2l(side, trans, m, n, k, a, lda, tau, c, ldc, work, info)
CUNM2L multiplies a general matrix by the unitary matrix from a QL factorization determined by cgeqlf...
subroutine cunmql(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
CUNMQL