167 SUBROUTINE zunmrq( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
168 $ work, lwork, info )
176 CHARACTER SIDE, TRANS
177 INTEGER INFO, K, LDA, LDC, LWORK, M, N
180 COMPLEX*16 A( lda, * ), C( ldc, * ), TAU( * ), WORK( * )
186 INTEGER NBMAX, LDT, TSIZE
187 parameter ( nbmax = 64, ldt = nbmax+1,
188 $ tsize = ldt*nbmax )
191 LOGICAL LEFT, LQUERY, NOTRAN
193 INTEGER I, I1, I2, I3, IB, IINFO, IWT, LDWORK, LWKOPT,
194 $ mi, nb, nbmin, ni, nq, nw
199 EXTERNAL lsame, ilaenv
212 left = lsame( side,
'L' )
213 notran = lsame( trans,
'N' )
214 lquery = ( lwork.EQ.-1 )
225 IF( .NOT.left .AND. .NOT.lsame( side,
'R' ) )
THEN
227 ELSE IF( .NOT.notran .AND. .NOT.lsame( trans,
'C' ) )
THEN
229 ELSE IF( m.LT.0 )
THEN
231 ELSE IF( n.LT.0 )
THEN
233 ELSE IF( k.LT.0 .OR. k.GT.nq )
THEN
235 ELSE IF( lda.LT.max( 1, k ) )
THEN
237 ELSE IF( ldc.LT.max( 1, m ) )
THEN
239 ELSE IF( lwork.LT.nw .AND. .NOT.lquery )
THEN
247 IF( m.EQ.0 .OR. n.EQ.0 )
THEN
250 nb = min( nbmax, ilaenv( 1,
'ZUNMRQ', side // trans, m, n,
252 lwkopt = nw*nb + tsize
258 CALL xerbla(
'ZUNMRQ', -info )
260 ELSE IF( lquery )
THEN
266 IF( m.EQ.0 .OR. n.EQ.0 )
THEN
272 IF( nb.GT.1 .AND. nb.LT.k )
THEN
273 IF( lwork.LT.nw*nb+tsize )
THEN
274 nb = (lwork-tsize) / ldwork
275 nbmin = max( 2, ilaenv( 2,
'ZUNMRQ', side // trans, m, n, k,
280 IF( nb.LT.nbmin .OR. nb.GE.k )
THEN
284 CALL zunmr2( side, trans, m, n, k, a, lda, tau, c, ldc, work,
291 IF( ( left .AND. .NOT.notran ) .OR.
292 $ ( .NOT.left .AND. notran ) )
THEN
297 i1 = ( ( k-1 ) / nb )*nb + 1
315 ib = min( nb, k-i+1 )
320 CALL zlarft(
'Backward',
'Rowwise', nq-k+i+ib-1, ib,
321 $ a( i, 1 ), lda, tau( i ), work( iwt ), ldt )
326 mi = m - k + i + ib - 1
331 ni = n - k + i + ib - 1
336 CALL zlarfb( side, transt,
'Backward',
'Rowwise', mi, ni,
337 $ ib, a( i, 1 ), lda, work( iwt ), ldt, c, ldc,
subroutine zunmr2(SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, INFO)
ZUNMR2 multiplies a general matrix by the unitary matrix from a RQ factorization determined by cgerqf...
subroutine xerbla(SRNAME, INFO)
XERBLA
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 zunmrq(SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, LWORK, INFO)
ZUNMRQ