124 SUBROUTINE dorglq( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
131 INTEGER INFO, K, LDA, LWORK, M, N
134 DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
140 DOUBLE PRECISION ZERO
141 parameter( zero = 0.0d+0 )
145 INTEGER I, IB, IINFO, IWS, J, KI, KK, L, LDWORK,
146 $ LWKOPT, NB, NBMIN, NX
163 nb = ilaenv( 1,
'DORGLQ',
' ', m, n, k, -1 )
164 lwkopt = max( 1, m )*nb
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
175 ELSE IF( lwork.LT.max( 1, m ) .AND. .NOT.lquery )
THEN
179 CALL xerbla(
'DORGLQ', -info )
181 ELSE IF( lquery )
THEN
195 IF( nb.GT.1 .AND. nb.LT.k )
THEN
199 nx = max( 0, ilaenv( 3,
'DORGLQ',
' ', m, n, k, -1 ) )
206 IF( lwork.LT.iws )
THEN
212 nbmin = max( 2, ilaenv( 2,
'DORGLQ',
' ', m, n, k,
218 IF( nb.GE.nbmin .AND. nb.LT.k .AND. nx.LT.k )
THEN
223 ki = ( ( k-nx-1 ) / nb )*nb
240 $
CALL dorgl2( m-kk, n-kk, k-kk, a( kk+1, kk+1 ), lda,
241 $ tau( kk+1 ), work, iinfo )
247 DO 50 i = ki + 1, 1, -nb
248 ib = min( nb, k-i+1 )
254 CALL dlarft(
'Forward',
'Rowwise', n-i+1, ib, a( i,
256 $ lda, tau( i ), work, ldwork )
260 CALL dlarfb(
'Right',
'Transpose',
'Forward',
262 $ m-i-ib+1, n-i+1, ib, a( i, i ), lda, work,
263 $ ldwork, a( i+ib, i ), lda, work( ib+1 ),
269 CALL dorgl2( ib, n-i+1, ib, a( i, i ), lda, tau( i ),
276 DO 30 l = i, i + 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 dorgl2(m, n, k, a, lda, tau, work, info)
DORGL2
subroutine dorglq(m, n, k, a, lda, tau, work, lwork, info)
DORGLQ