167 SUBROUTINE dormlq( 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 DOUBLE PRECISION 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, IC, IINFO, IWT, JC, LDWORK,
194 $ lwkopt, 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,
'T' ) )
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.max( 1, nw ) .AND. .NOT.lquery )
THEN
247 nb = min( nbmax, ilaenv( 1,
'DORMLQ', side // trans, m, n, k,
249 lwkopt = max( 1, nw )*nb + tsize
254 CALL xerbla(
'DORMLQ', -info )
256 ELSE IF( lquery )
THEN
262 IF( m.EQ.0 .OR. n.EQ.0 .OR. k.EQ.0 )
THEN
269 IF( nb.GT.1 .AND. nb.LT.k )
THEN
270 IF( lwork.LT.nw*nb+tsize )
THEN
271 nb = (lwork-tsize) / ldwork
272 nbmin = max( 2, ilaenv( 2,
'DORMLQ', side // trans, m, n, k,
277 IF( nb.LT.nbmin .OR. nb.GE.k )
THEN
281 CALL dorml2( side, trans, m, n, k, a, lda, tau, c, ldc, work,
288 IF( ( left .AND. notran ) .OR.
289 $ ( .NOT.left .AND. .NOT.notran ) )
THEN
294 i1 = ( ( k-1 ) / nb )*nb + 1
314 ib = min( nb, k-i+1 )
319 CALL dlarft(
'Forward',
'Rowwise', nq-i+1, ib, a( i, i ),
320 $ lda, tau( i ), work( iwt ), ldt )
337 CALL dlarfb( side, transt,
'Forward',
'Rowwise', mi, ni, ib,
338 $ a( i, i ), lda, work( iwt ), ldt,
339 $ c( ic, jc ), ldc, work, ldwork )
subroutine dormlq(SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, LWORK, INFO)
DORMLQ
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 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 xerbla(SRNAME, INFO)
XERBLA
subroutine dlarft(DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT)
DLARFT forms the triangular factor T of a block reflector H = I - vtvH