122 SUBROUTINE sorgtr( UPLO, N, A, LDA, TAU, WORK, LWORK, INFO )
130 INTEGER INFO, LDA, LWORK, N
133 REAL A( LDA, * ), TAU( * ), WORK( * )
140 parameter( zero = 0.0e+0, one = 1.0e+0 )
143 LOGICAL LQUERY, UPPER
144 INTEGER I, IINFO, J, LWKOPT, NB
150 EXTERNAL ilaenv, lsame, sroundup_lwork
163 lquery = ( lwork.EQ.-1 )
164 upper = lsame( uplo,
'U' )
165 IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
167 ELSE IF( n.LT.0 )
THEN
169 ELSE IF( lda.LT.max( 1, n ) )
THEN
171 ELSE IF( lwork.LT.max( 1, n-1 ) .AND. .NOT.lquery )
THEN
177 nb = ilaenv( 1,
'SORGQL',
' ', n-1, n-1, n-1, -1 )
179 nb = ilaenv( 1,
'SORGQR',
' ', n-1, n-1, n-1, -1 )
181 lwkopt = max( 1, n-1 )*nb
182 work( 1 ) = sroundup_lwork(lwkopt)
186 CALL xerbla(
'SORGTR', -info )
188 ELSE IF( lquery )
THEN
209 a( i, j ) = a( i, j+1 )
220 CALL sorgql( n-1, n-1, n-1, a, lda, tau, work, lwork, iinfo )
233 a( i, j ) = a( i, j-1 )
244 CALL sorgqr( n-1, n-1, n-1, a( 2, 2 ), lda, tau, work,
248 work( 1 ) = sroundup_lwork(lwkopt)
subroutine xerbla(srname, info)
subroutine sorgql(m, n, k, a, lda, tau, work, lwork, info)
SORGQL
subroutine sorgqr(m, n, k, a, lda, tau, work, lwork, info)
SORGQR
subroutine sorgtr(uplo, n, a, lda, tau, work, lwork, info)
SORGTR