1 SUBROUTINE dormlq( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
11 INTEGER INFO, K, LDA, LDC, LWORK, M, N
14 DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
103 parameter( nbmax = 64, ldt = nbmax+1 )
106 LOGICAL LEFT, LQUERY, NOTRAN
108 INTEGER I, I1, I2, I3, IB, IC, IINFO, IWS, JC, LDWORK,
109 $ lwkopt, mi, nb, nbmin, ni, nq, nw
112 DOUBLE PRECISION T( LDT, NBMAX )
117 EXTERNAL lsame, ilaenv
130 left = lsame( side,
'L' )
131 notran = lsame( trans,
'N' )
132 lquery = ( lwork.EQ.-1 )
143 IF( .NOT.left .AND. .NOT.lsame( side,
'R' ) )
THEN
145 ELSE IF( .NOT.notran .AND. .NOT.lsame( trans,
'T' ) )
THEN
147 ELSE IF( m.LT.0 )
THEN
149 ELSE IF( n.LT.0 )
THEN
151 ELSE IF( k.LT.0 .OR. k.GT.nq )
THEN
153 ELSE IF( lda.LT.max( 1, k ) )
THEN
155 ELSE IF( ldc.LT.max( 1, m ) )
THEN
157 ELSE IF( lwork.LT.max( 1, nw ) .AND. .NOT.lquery )
THEN
166 nb = min( nbmax, ilaenv( 1,
'DORMLQ', side // trans, m, n, k,
168 lwkopt = max( 1, nw )*nb
173 CALL xerbla(
'DORMLQ', -info )
175 ELSE IF( lquery )
THEN
181 IF( m.EQ.0 .OR. n.EQ.0 .OR. k.EQ.0 )
THEN
188 IF( nb.GT.1 .AND. nb.LT.k )
THEN
190 IF( lwork.LT.iws )
THEN
192 nbmin = max( 2, ilaenv( 2,
'DORMLQ', side // trans, m, n, k,
199 IF( nb.LT.nbmin .OR. nb.GE.k )
THEN
203 CALL dorml2( side, trans, m, n, k, a, lda, tau, c, ldc, work,
209 IF( ( left .AND. notran ) .OR.
210 $ ( .NOT.left .AND. .NOT.notran ) )
THEN
215 i1 = ( ( k-1 ) / nb )*nb + 1
235 ib = min( nb, k-i+1 )
240 CALL dlarft(
'Forward',
'Rowwise', nq-i+1, ib, a( i, i ),
241 $ lda, tau( i ), t, ldt )
258 CALL dlarfb( side, transt,
'Forward',
'Rowwise', mi, ni, ib,
259 $ a( i, i ), lda, t, ldt, c( ic, jc ), ldc, work,
subroutine dlarfb(SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV, T, LDT, C, LDC, WORK, LDWORK)
subroutine dlarft(DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT)
subroutine dorml2(SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, INFO)
subroutine dormlq(SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, LWORK, INFO)
subroutine xerbla(SRNAME, INFO)