165 SUBROUTINE dormrq( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
166 $ WORK, LWORK, INFO )
173 CHARACTER SIDE, TRANS
174 INTEGER INFO, K, LDA, LDC, LWORK, M, N
177 DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
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, IINFO, IWT, LDWORK, LWKOPT,
191 $ mi, nb, nbmin, ni, nq, nw
196 EXTERNAL lsame, ilaenv
209 left = lsame( side,
'L' )
210 notran = lsame( trans,
'N' )
211 lquery = ( lwork.EQ.-1 )
222 IF( .NOT.left .AND. .NOT.lsame( side,
'R' ) )
THEN
224 ELSE IF( .NOT.notran .AND. .NOT.lsame( trans,
'T' ) )
THEN
226 ELSE IF( m.LT.0 )
THEN
228 ELSE IF( n.LT.0 )
THEN
230 ELSE IF( k.LT.0 .OR. k.GT.nq )
THEN
232 ELSE IF( lda.LT.max( 1, k ) )
THEN
234 ELSE IF( ldc.LT.max( 1, m ) )
THEN
236 ELSE IF( lwork.LT.nw .AND. .NOT.lquery )
THEN
244 IF( m.EQ.0 .OR. n.EQ.0 )
THEN
247 nb = min( nbmax, ilaenv( 1,
'DORMRQ', side // trans, m, n,
249 lwkopt = nw*nb + tsize
255 CALL xerbla(
'DORMRQ', -info )
257 ELSE IF( lquery )
THEN
263 IF( m.EQ.0 .OR. n.EQ.0 )
THEN
269 IF( nb.GT.1 .AND. nb.LT.k )
THEN
270 IF( lwork.LT.lwkopt )
THEN
271 nb = (lwork-tsize) / ldwork
272 nbmin = max( 2, ilaenv( 2,
'DORMRQ', side // trans, m, n, k,
277 IF( nb.LT.nbmin .OR. nb.GE.k )
THEN
281 CALL dormr2( side, trans, m, n, k, a, lda, tau, c, ldc, work,
288 IF( ( left .AND. .NOT.notran ) .OR.
289 $ ( .NOT.left .AND. notran ) )
THEN
294 i1 = ( ( k-1 ) / nb )*nb + 1
312 ib = min( nb, k-i+1 )
317 CALL dlarft(
'Backward',
'Rowwise', nq-k+i+ib-1, ib,
318 $ a( i, 1 ), lda, tau( i ), work( iwt ), ldt )
323 mi = m - k + i + ib - 1
328 ni = n - k + i + ib - 1
333 CALL dlarfb( side, transt,
'Backward',
'Rowwise', mi, ni,
334 $ ib, a( i, 1 ), lda, work( iwt ), ldt, c, ldc,
subroutine xerbla(srname, info)
subroutine dlarfb(side, trans, direct, storev, m, n, k, v, ldv, t, ldt, c, ldc, work, ldwork)
DLARFB applies a block reflector or its transpose to a general rectangular matrix.
subroutine dlarft(direct, storev, n, k, v, ldv, tau, t, ldt)
DLARFT forms the triangular factor T of a block reflector H = I - vtvH
subroutine dormr2(side, trans, m, n, k, a, lda, tau, c, ldc, work, info)
DORMR2 multiplies a general matrix by the orthogonal matrix from a RQ factorization determined by sge...
subroutine dormrq(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
DORMRQ