165 SUBROUTINE dormlq( 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, IC, IINFO, IWT, JC, LDWORK,
191 $ lwkopt, 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 nb = min( nbmax, ilaenv( 1,
'DORMLQ', side // trans, m, n, k,
246 lwkopt = nw*nb + tsize
251 CALL xerbla(
'DORMLQ', -info )
253 ELSE IF( lquery )
THEN
259 IF( m.EQ.0 .OR. n.EQ.0 .OR. k.EQ.0 )
THEN
266 IF( nb.GT.1 .AND. nb.LT.k )
THEN
267 IF( lwork.LT.lwkopt )
THEN
268 nb = (lwork-tsize) / ldwork
269 nbmin = max( 2, ilaenv( 2,
'DORMLQ', side // trans, m, n, k,
274 IF( nb.LT.nbmin .OR. nb.GE.k )
THEN
278 CALL dorml2( side, trans, m, n, k, a, lda, tau, c, ldc, work,
285 IF( ( left .AND. notran ) .OR.
286 $ ( .NOT.left .AND. .NOT.notran ) )
THEN
291 i1 = ( ( k-1 ) / nb )*nb + 1
311 ib = min( nb, k-i+1 )
316 CALL dlarft(
'Forward',
'Rowwise', nq-i+1, ib, a( i, i ),
317 $ lda, tau( i ), work( iwt ), ldt )
334 CALL dlarfb( side, transt,
'Forward',
'Rowwise', mi, ni, ib,
335 $ a( i, i ), lda, work( iwt ), ldt,
336 $ c( ic, jc ), ldc, work, ldwork )
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 dorml2(side, trans, m, n, k, a, lda, tau, c, ldc, work, info)
DORML2 multiplies a general matrix by the orthogonal matrix from a LQ factorization determined by sge...
subroutine dormlq(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
DORMLQ