126 SUBROUTINE dorglq( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
133 INTEGER INFO, K, LDA, LWORK, M, N
136 DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
142 DOUBLE PRECISION ZERO
143 parameter( zero = 0.0d+0 )
147 INTEGER I, IB, IINFO, IWS, J, KI, KK, L, LDWORK,
148 $ LWKOPT, NB, NBMIN, NX
165 nb = ilaenv( 1,
'DORGLQ',
' ', m, n, k, -1 )
166 lwkopt = max( 1, m )*nb
168 lquery = ( lwork.EQ.-1 )
171 ELSE IF( n.LT.m )
THEN
173 ELSE IF( k.LT.0 .OR. k.GT.m )
THEN
175 ELSE IF( lda.LT.max( 1, m ) )
THEN
177 ELSE IF( lwork.LT.max( 1, m ) .AND. .NOT.lquery )
THEN
181 CALL xerbla(
'DORGLQ', -info )
183 ELSE IF( lquery )
THEN
197 IF( nb.GT.1 .AND. nb.LT.k )
THEN
201 nx = max( 0, ilaenv( 3,
'DORGLQ',
' ', m, n, k, -1 ) )
208 IF( lwork.LT.iws )
THEN
214 nbmin = max( 2, ilaenv( 2,
'DORGLQ',
' ', m, n, k, -1 ) )
219 IF( nb.GE.nbmin .AND. nb.LT.k .AND. nx.LT.k )
THEN
224 ki = ( ( k-nx-1 ) / nb )*nb
241 $
CALL dorgl2( m-kk, n-kk, k-kk, a( kk+1, kk+1 ), lda,
242 $ tau( kk+1 ), work, iinfo )
248 DO 50 i = ki + 1, 1, -nb
249 ib = min( nb, k-i+1 )
255 CALL dlarft(
'Forward',
'Rowwise', n-i+1, ib, a( i, i ),
256 $ lda, tau( i ), work, ldwork )
260 CALL dlarfb(
'Right',
'Transpose',
'Forward',
'Rowwise',
261 $ m-i-ib+1, n-i+1, ib, a( i, i ), lda, work,
262 $ ldwork, a( i+ib, i ), lda, work( ib+1 ),
268 CALL dorgl2( ib, n-i+1, ib, a( i, i ), lda, tau( i ), work,
274 DO 30 l = i, i + 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 dorgl2(m, n, k, a, lda, tau, work, info)
DORGL2
subroutine dorglq(m, n, k, a, lda, tau, work, lwork, info)
DORGLQ