125 SUBROUTINE dorgrq( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
132 INTEGER INFO, K, LDA, LWORK, M, N
135 DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
141 DOUBLE PRECISION ZERO
142 parameter( zero = 0.0d+0 )
146 INTEGER I, IB, II, IINFO, IWS, J, KK, L, LDWORK,
147 $ LWKOPT, NB, NBMIN, NX
164 lquery = ( lwork.EQ.-1 )
167 ELSE IF( n.LT.m )
THEN
169 ELSE IF( k.LT.0 .OR. k.GT.m )
THEN
171 ELSE IF( lda.LT.max( 1, m ) )
THEN
179 nb = ilaenv( 1,
'DORGRQ',
' ', m, n, k, -1 )
184 IF( lwork.LT.max( 1, m ) .AND. .NOT.lquery )
THEN
190 CALL xerbla(
'DORGRQ', -info )
192 ELSE IF( lquery )
THEN
205 IF( nb.GT.1 .AND. nb.LT.k )
THEN
209 nx = max( 0, ilaenv( 3,
'DORGRQ',
' ', m, n, k, -1 ) )
216 IF( lwork.LT.iws )
THEN
222 nbmin = max( 2, ilaenv( 2,
'DORGRQ',
' ', m, n, k,
228 IF( nb.GE.nbmin .AND. nb.LT.k .AND. nx.LT.k )
THEN
233 kk = min( k, ( ( k-nx+nb-1 ) / nb )*nb )
237 DO 20 j = n - kk + 1, n
248 CALL dorgr2( m-kk, n-kk, k-kk, a, lda, tau, work, iinfo )
254 DO 50 i = k - kk + 1, k, nb
255 ib = min( nb, k-i+1 )
262 CALL dlarft(
'Backward',
'Rowwise', n-k+i+ib-1, ib,
263 $ a( ii, 1 ), lda, tau( i ), work, ldwork )
267 CALL dlarfb(
'Right',
'Transpose',
'Backward',
269 $ ii-1, n-k+i+ib-1, ib, a( ii, 1 ), lda, work,
270 $ ldwork, a, lda, work( ib+1 ), ldwork )
275 CALL dorgr2( ib, n-k+i+ib-1, ib, a( ii, 1 ), lda,
281 DO 40 l = n - k + i + ib, n
282 DO 30 j = ii, ii + ib - 1
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.
recursive 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 dorgr2(m, n, k, a, lda, tau, work, info)
DORGR2 generates all or part of the orthogonal matrix Q from an RQ factorization determined by sgerqf...
subroutine dorgrq(m, n, k, a, lda, tau, work, lwork, info)
DORGRQ