164 SUBROUTINE cunmlq( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
165 $ WORK, LWORK, INFO )
172 CHARACTER SIDE, TRANS
173 INTEGER INFO, K, LDA, LDC, LWORK, M, N
176 COMPLEX A( LDA, * ), C( LDC, * ), TAU( * ),
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
197 EXTERNAL lsame, ilaenv, sroundup_lwork
210 left = lsame( side,
'L' )
211 notran = lsame( trans,
'N' )
212 lquery = ( lwork.EQ.-1 )
223 IF( .NOT.left .AND. .NOT.lsame( side,
'R' ) )
THEN
225 ELSE IF( .NOT.notran .AND. .NOT.lsame( trans,
'C' ) )
THEN
227 ELSE IF( m.LT.0 )
THEN
229 ELSE IF( n.LT.0 )
THEN
231 ELSE IF( k.LT.0 .OR. k.GT.nq )
THEN
233 ELSE IF( lda.LT.max( 1, k ) )
THEN
235 ELSE IF( ldc.LT.max( 1, m ) )
THEN
237 ELSE IF( lwork.LT.nw .AND. .NOT.lquery )
THEN
245 IF( m.EQ.0 .OR. n.EQ.0 .OR. k.EQ.0 )
THEN
248 nb = min( nbmax, ilaenv( 1,
'CUNMLQ', side // trans, m,
251 lwkopt = nw*nb + tsize
253 work( 1 ) = sroundup_lwork(lwkopt)
257 CALL xerbla(
'CUNMLQ', -info )
259 ELSE IF( lquery )
THEN
265 IF( m.EQ.0 .OR. n.EQ.0 .OR. k.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,
'CUNMLQ', side // trans, m, n,
282 IF( nb.LT.nbmin .OR. nb.GE.k )
THEN
286 CALL cunml2( side, trans, m, n, k, a, lda, tau, c, ldc,
294 IF( ( left .AND. notran ) .OR.
295 $ ( .NOT.left .AND. .NOT.notran ) )
THEN
300 i1 = ( ( k-1 ) / nb )*nb + 1
320 ib = min( nb, k-i+1 )
325 CALL clarft(
'Forward',
'Rowwise', nq-i+1, ib, a( i, i ),
326 $ lda, tau( i ), work( iwt ), ldt )
343 CALL clarfb( side, transt,
'Forward',
'Rowwise', mi, ni,
345 $ a( i, i ), lda, work( iwt ), ldt,
346 $ c( ic, jc ), ldc, work, ldwork )
349 work( 1 ) = sroundup_lwork(lwkopt)
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.
recursive 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 cunml2(side, trans, m, n, k, a, lda, tau, c, ldc, work, info)
CUNML2 multiplies a general matrix by the unitary matrix from a LQ factorization determined by cgelqf...
subroutine cunmlq(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
CUNMLQ