168 SUBROUTINE cunmql( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
169 $ work, lwork, info )
177 CHARACTER SIDE, TRANS
178 INTEGER INFO, K, LDA, LDC, LWORK, M, N
181 COMPLEX A( lda, * ), C( ldc, * ), TAU( * ),
188 INTEGER NBMAX, LDT, TSIZE
189 parameter ( nbmax = 64, ldt = nbmax+1,
190 $ tsize = ldt*nbmax )
193 LOGICAL LEFT, LQUERY, NOTRAN
194 INTEGER I, I1, I2, I3, IB, IINFO, IWT, LDWORK, LWKOPT,
195 $ mi, nb, nbmin, ni, nq, nw
200 EXTERNAL lsame, ilaenv
213 left = lsame( side,
'L' )
214 notran = lsame( trans,
'N' )
215 lquery = ( lwork.EQ.-1 )
226 IF( .NOT.left .AND. .NOT.lsame( side,
'R' ) )
THEN
228 ELSE IF( .NOT.notran .AND. .NOT.lsame( trans,
'C' ) )
THEN
230 ELSE IF( m.LT.0 )
THEN
232 ELSE IF( n.LT.0 )
THEN
234 ELSE IF( k.LT.0 .OR. k.GT.nq )
THEN
236 ELSE IF( lda.LT.max( 1, nq ) )
THEN
238 ELSE IF( ldc.LT.max( 1, m ) )
THEN
240 ELSE IF( lwork.LT.nw .AND. .NOT.lquery )
THEN
248 IF( m.EQ.0 .OR. n.EQ.0 )
THEN
251 nb = min( nbmax, ilaenv( 1,
'CUNMQL', side // trans, m, n,
253 lwkopt = nw*nb + tsize
259 CALL xerbla(
'CUNMQL', -info )
261 ELSE IF( lquery )
THEN
267 IF( m.EQ.0 .OR. n.EQ.0 )
THEN
275 IF( nb.GT.1 .AND. nb.LT.k )
THEN
276 IF( lwork.LT.(nw*nb+tsize) )
THEN
277 nb = (lwork-tsize) / ldwork
278 nbmin = max( 2, ilaenv( 2,
'CUNMQL', side // trans, m, n, k,
283 IF( nb.LT.nbmin .OR. nb.GE.k )
THEN
287 CALL cunm2l( side, trans, m, n, k, a, lda, tau, c, ldc, work,
294 IF( ( left .AND. notran ) .OR.
295 $ ( .NOT.left .AND. .NOT.notran ) )
THEN
300 i1 = ( ( k-1 ) / nb )*nb + 1
312 ib = min( nb, k-i+1 )
317 CALL clarft(
'Backward',
'Columnwise', nq-k+i+ib-1, ib,
318 $ a( 1, i ), lda, tau( i ), work( iwt ), ldt )
323 mi = m - k + i + ib - 1
328 ni = n - k + i + ib - 1
333 CALL clarfb( side, trans,
'Backward',
'Columnwise', mi, ni,
334 $ ib, a( 1, i ), lda, work( iwt ), ldt, c, ldc,
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 xerbla(SRNAME, INFO)
XERBLA
subroutine cunmql(SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, LWORK, INFO)
CUNMQL
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...