163 SUBROUTINE zunmrq( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
164 $ WORK, LWORK, INFO )
171 CHARACTER SIDE, TRANS
172 INTEGER INFO, K, LDA, LDC, LWORK, M, N
175 COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
181 INTEGER NBMAX, LDT, TSIZE
182 parameter( nbmax = 64, ldt = nbmax+1,
183 $ tsize = ldt*nbmax )
186 LOGICAL LEFT, LQUERY, NOTRAN
188 INTEGER I, I1, I2, I3, IB, IINFO, IWT, LDWORK, LWKOPT,
189 $ mi, nb, nbmin, ni, nq, nw
194 EXTERNAL lsame, ilaenv
207 left = lsame( side,
'L' )
208 notran = lsame( trans,
'N' )
209 lquery = ( lwork.EQ.-1 )
220 IF( .NOT.left .AND. .NOT.lsame( side,
'R' ) )
THEN
222 ELSE IF( .NOT.notran .AND. .NOT.lsame( trans,
'C' ) )
THEN
224 ELSE IF( m.LT.0 )
THEN
226 ELSE IF( n.LT.0 )
THEN
228 ELSE IF( k.LT.0 .OR. k.GT.nq )
THEN
230 ELSE IF( lda.LT.max( 1, k ) )
THEN
232 ELSE IF( ldc.LT.max( 1, m ) )
THEN
234 ELSE IF( lwork.LT.nw .AND. .NOT.lquery )
THEN
242 IF( m.EQ.0 .OR. n.EQ.0 )
THEN
245 nb = min( nbmax, ilaenv( 1,
'ZUNMRQ', side // trans, m,
248 lwkopt = nw*nb + tsize
254 CALL xerbla(
'ZUNMRQ', -info )
256 ELSE IF( lquery )
THEN
262 IF( m.EQ.0 .OR. n.EQ.0 )
THEN
268 IF( nb.GT.1 .AND. nb.LT.k )
THEN
269 IF( lwork.LT.lwkopt )
THEN
270 nb = (lwork-tsize) / ldwork
271 nbmin = max( 2, ilaenv( 2,
'ZUNMRQ', side // trans, m, n,
277 IF( nb.LT.nbmin .OR. nb.GE.k )
THEN
281 CALL zunmr2( side, trans, m, n, k, a, lda, tau, c, ldc,
289 IF( ( left .AND. .NOT.notran ) .OR.
290 $ ( .NOT.left .AND. notran ) )
THEN
295 i1 = ( ( k-1 ) / nb )*nb + 1
313 ib = min( nb, k-i+1 )
318 CALL zlarft(
'Backward',
'Rowwise', nq-k+i+ib-1, ib,
319 $ a( i, 1 ), lda, tau( i ), work( iwt ), ldt )
324 mi = m - k + i + ib - 1
329 ni = n - k + i + ib - 1
334 CALL zlarfb( side, transt,
'Backward',
'Rowwise', mi, ni,
335 $ ib, a( i, 1 ), lda, work( iwt ), ldt, c, ldc,
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.
recursive 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 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 zunmrq(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
ZUNMRQ