127 SUBROUTINE dorgrq( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
134 INTEGER INFO, K, LDA, LWORK, M, N
137 DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
143 DOUBLE PRECISION ZERO
144 parameter( zero = 0.0d+0 )
148 INTEGER I, IB, II, IINFO, IWS, J, KK, L, LDWORK,
149 $ LWKOPT, NB, NBMIN, NX
166 lquery = ( lwork.EQ.-1 )
169 ELSE IF( n.LT.m )
THEN
171 ELSE IF( k.LT.0 .OR. k.GT.m )
THEN
173 ELSE IF( lda.LT.max( 1, m ) )
THEN
181 nb = ilaenv( 1,
'DORGRQ',
' ', m, n, k, -1 )
186 IF( lwork.LT.max( 1, m ) .AND. .NOT.lquery )
THEN
192 CALL xerbla(
'DORGRQ', -info )
194 ELSE IF( lquery )
THEN
207 IF( nb.GT.1 .AND. nb.LT.k )
THEN
211 nx = max( 0, ilaenv( 3,
'DORGRQ',
' ', m, n, k, -1 ) )
218 IF( lwork.LT.iws )
THEN
224 nbmin = max( 2, ilaenv( 2,
'DORGRQ',
' ', m, n, k, -1 ) )
229 IF( nb.GE.nbmin .AND. nb.LT.k .AND. nx.LT.k )
THEN
234 kk = min( k, ( ( k-nx+nb-1 ) / nb )*nb )
238 DO 20 j = n - kk + 1, n
249 CALL dorgr2( m-kk, n-kk, k-kk, a, lda, tau, work, iinfo )
255 DO 50 i = k - kk + 1, k, nb
256 ib = min( nb, k-i+1 )
263 CALL dlarft(
'Backward',
'Rowwise', n-k+i+ib-1, ib,
264 $ a( ii, 1 ), lda, tau( i ), work, ldwork )
268 CALL dlarfb(
'Right',
'Transpose',
'Backward',
'Rowwise',
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, tau( i ),
280 DO 40 l = n - k + i + ib, n
281 DO 30 j = ii, ii + ib - 1
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 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