124 SUBROUTINE dorgtr( UPLO, N, A, LDA, TAU, WORK, LWORK, INFO )
133 INTEGER info, lda, lwork, n
136 DOUBLE PRECISION a( lda, * ), tau( * ), work( * )
142 DOUBLE PRECISION zero, one
143 parameter( zero = 0.0d+0, one = 1.0d+0 )
146 LOGICAL lquery, upper
147 INTEGER i, iinfo, j, lwkopt, nb
165 lquery = ( lwork.EQ.-1 )
166 upper =
lsame( uplo,
'U' )
167 IF( .NOT.upper .AND. .NOT.
lsame( uplo,
'L' ) )
THEN
169 ELSE IF( n.LT.0 )
THEN
171 ELSE IF( lda.LT.max( 1, n ) )
THEN
173 ELSE IF( lwork.LT.max( 1, n-1 ) .AND. .NOT.lquery )
THEN
179 nb =
ilaenv( 1,
'DORGQL',
' ', n-1, n-1, n-1, -1 )
181 nb =
ilaenv( 1,
'DORGQR',
' ', n-1, n-1, n-1, -1 )
183 lwkopt = max( 1, n-1 )*nb
188 CALL
xerbla(
'DORGTR', -info )
190 ELSE IF( lquery )
THEN
211 a( i, j ) = a( i, j+1 )
222 CALL
dorgql( n-1, n-1, n-1, a, lda, tau, work, lwork, iinfo )
235 a( i, j ) = a( i, j-1 )
246 CALL
dorgqr( n-1, n-1, n-1, a( 2, 2 ), lda, tau, work,