124 SUBROUTINE sorgtr( UPLO, N, A, LDA, TAU, WORK, LWORK, INFO )
133 INTEGER info, lda, lwork, n
136 REAL a( lda, * ), tau( * ), work( * )
143 parameter( zero = 0.0e+0, one = 1.0e+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,
'SORGQL',
' ', n-1, n-1, n-1, -1 )
181 nb =
ilaenv( 1,
'SORGQR',
' ', n-1, n-1, n-1, -1 )
183 lwkopt = max( 1, n-1 )*nb
188 CALL
xerbla(
'SORGTR', -info )
190 ELSE IF( lquery )
THEN
211 a( i, j ) = a( i, j+1 )
222 CALL
sorgql( n-1, n-1, n-1, a, lda, tau, work, lwork, iinfo )
235 a( i, j ) = a( i, j-1 )
246 CALL
sorgqr( n-1, n-1, n-1, a( 2, 2 ), lda, tau, work,