156 SUBROUTINE sorgbr( VECT, M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
164 INTEGER INFO, K, LDA, LWORK, M, N
167 REAL A( LDA, * ), TAU( * ), WORK( * )
174 parameter( zero = 0.0e+0, one = 1.0e+0 )
177 LOGICAL LQUERY, WANTQ
178 INTEGER I, IINFO, J, LWKOPT, MN
183 EXTERNAL lsame, sroundup_lwork
196 wantq = lsame( vect,
'Q' )
198 lquery = ( lwork.EQ.-1 )
199 IF( .NOT.wantq .AND. .NOT.lsame( vect,
'P' ) )
THEN
201 ELSE IF( m.LT.0 )
THEN
203 ELSE IF( n.LT.0 .OR. ( wantq .AND. ( n.GT.m .OR. n.LT.min( m,
204 $ k ) ) ) .OR. ( .NOT.wantq .AND. ( m.GT.n .OR. m.LT.
205 $ min( n, k ) ) ) )
THEN
207 ELSE IF( k.LT.0 )
THEN
209 ELSE IF( lda.LT.max( 1, m ) )
THEN
211 ELSE IF( lwork.LT.max( 1, mn ) .AND. .NOT.lquery )
THEN
219 CALL sorgqr( m, n, k, a, lda, tau, work, -1, iinfo )
222 CALL sorgqr( m-1, m-1, m-1, a, lda, tau, work, -1,
228 CALL sorglq( m, n, k, a, lda, tau, work, -1, iinfo )
231 CALL sorglq( n-1, n-1, n-1, a, lda, tau, work, -1,
236 lwkopt = int( work( 1 ) )
237 lwkopt = max(lwkopt, mn)
241 CALL xerbla(
'SORGBR', -info )
243 ELSE IF( lquery )
THEN
244 work( 1 ) = sroundup_lwork(lwkopt)
250 IF( m.EQ.0 .OR. n.EQ.0 )
THEN
264 CALL sorgqr( m, n, k, a, lda, tau, work, lwork, iinfo )
277 a( i, j ) = a( i, j-1 )
288 CALL sorgqr( m-1, m-1, m-1, a( 2, 2 ), lda, tau, work,
301 CALL sorglq( m, n, k, a, lda, tau, work, lwork, iinfo )
316 DO 50 i = j - 1, 2, -1
317 a( i, j ) = a( i-1, j )
325 CALL sorglq( n-1, n-1, n-1, a( 2, 2 ), lda, tau, work,
330 work( 1 ) = sroundup_lwork(lwkopt)
subroutine xerbla(srname, info)
subroutine sorgbr(vect, m, n, k, a, lda, tau, work, lwork, info)
SORGBR
subroutine sorglq(m, n, k, a, lda, tau, work, lwork, info)
SORGLQ
subroutine sorgqr(m, n, k, a, lda, tau, work, lwork, info)
SORGQR