1 SUBROUTINE dorgqr( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
9 INTEGER INFO, K, LDA, LWORK, M, N
12 DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
74 parameter( zero = 0.0d+0 )
78 INTEGER I, IB, IINFO, IWS, J, KI, KK, L, LDWORK,
79 $ LWKOPT, NB, NBMIN, NX
96 nb = ilaenv( 1,
'DORGQR',
' ', m, n, k, -1 )
97 lwkopt = max( 1, n )*nb
99 lquery = ( lwork.EQ.-1 )
102 ELSE IF( n.LT.0 .OR. n.GT.m )
THEN
104 ELSE IF( k.LT.0 .OR. k.GT.n )
THEN
106 ELSE IF( lda.LT.max( 1, m ) )
THEN
108 ELSE IF( lwork.LT.max( 1, n ) .AND. .NOT.lquery )
THEN
112 CALL xerbla(
'DORGQR', -info )
114 ELSE IF( lquery )
THEN
128 IF( nb.GT.1 .AND. nb.LT.k )
THEN
132 nx = max( 0, ilaenv( 3,
'DORGQR',
' ', m, n, k, -1 ) )
139 IF( lwork.LT.iws )
THEN
145 nbmin = max( 2, ilaenv( 2,
'DORGQR',
' ', m, n, k, -1 ) )
150 IF( nb.GE.nbmin .AND. nb.LT.k .AND. nx.LT.k )
THEN
155 ki = ( ( k-nx-1 ) / nb )*nb
172 $
CALL dorg2r( m-kk, n-kk, k-kk, a( kk+1, kk+1 ), lda,
173 $ tau( kk+1 ), work, iinfo )
179 DO 50 i = ki + 1, 1, -nb
180 ib = min( nb, k-i+1 )
186 CALL dlarft(
'Forward',
'Columnwise', m-i+1, ib,
187 $ a( i, i ), lda, tau( i ), work, ldwork )
191 CALL dlarfb(
'Left',
'No transpose',
'Forward',
192 $
'Columnwise', m-i+1, n-i-ib+1, ib,
193 $ a( i, i ), lda, work, ldwork, a( i, i+ib ),
194 $ lda, work( ib+1 ), ldwork )
199 CALL dorg2r( m-i+1, ib, ib, a( i, i ), lda, tau( i ), work,
204 DO 40 j = i, i + ib - 1
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 dorg2r(M, N, K, A, LDA, TAU, WORK, INFO)
subroutine dorgqr(M, N, K, A, LDA, TAU, WORK, LWORK, INFO)
subroutine xerbla(SRNAME, INFO)