168 SUBROUTINE cunmrq( 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
195 INTEGER I, I1, I2, I3, IB, IINFO, IWT, LDWORK, LWKOPT,
196 $ mi, nb, nbmin, ni, nq, nw
201 EXTERNAL lsame, ilaenv
214 left = lsame( side,
'L' )
215 notran = lsame( trans,
'N' )
216 lquery = ( lwork.EQ.-1 )
227 IF( .NOT.left .AND. .NOT.lsame( side,
'R' ) )
THEN
229 ELSE IF( .NOT.notran .AND. .NOT.lsame( trans,
'C' ) )
THEN
231 ELSE IF( m.LT.0 )
THEN
233 ELSE IF( n.LT.0 )
THEN
235 ELSE IF( k.LT.0 .OR. k.GT.nq )
THEN
237 ELSE IF( lda.LT.max( 1, k ) )
THEN
239 ELSE IF( ldc.LT.max( 1, m ) )
THEN
241 ELSE IF( lwork.LT.nw .AND. .NOT.lquery )
THEN
249 IF( m.EQ.0 .OR. n.EQ.0 )
THEN
252 nb = min( nbmax, ilaenv( 1,
'CUNMRQ', side // trans, m, n,
254 lwkopt = nw*nb + tsize
260 CALL xerbla(
'CUNMRQ', -info )
262 ELSE IF( lquery )
THEN
268 IF( m.EQ.0 .OR. n.EQ.0 )
THEN
274 IF( nb.GT.1 .AND. nb.LT.k )
THEN
275 IF( lwork.LT.nw*nb+tsize )
THEN
276 nb = (lwork-tsize) / ldwork
277 nbmin = max( 2, ilaenv( 2,
'CUNMRQ', side // trans, m, n, k,
282 IF( nb.LT.nbmin .OR. nb.GE.k )
THEN
286 CALL cunmr2( side, trans, m, n, k, a, lda, tau, c, ldc, work,
293 IF( ( left .AND. .NOT.notran ) .OR.
294 $ ( .NOT.left .AND. notran ) )
THEN
299 i1 = ( ( k-1 ) / nb )*nb + 1
317 ib = min( nb, k-i+1 )
322 CALL clarft(
'Backward',
'Rowwise', nq-k+i+ib-1, ib,
323 $ a( i, 1 ), lda, tau( i ), work( iwt ), ldt )
328 mi = m - k + i + ib - 1
333 ni = n - k + i + ib - 1
338 CALL clarfb( side, transt,
'Backward',
'Rowwise', mi, ni,
339 $ ib, a( i, 1 ), 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 xerbla(SRNAME, INFO)
XERBLA
subroutine cunmrq(SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, LWORK, INFO)
CUNMRQ
subroutine cunmr2(SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, INFO)
CUNMR2 multiplies a general matrix by the unitary matrix from a RQ factorization determined by cgerqf...
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...