158 SUBROUTINE sorgbr( VECT, M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
167 INTEGER INFO, K, LDA, LWORK, M, N
170 REAL A( lda, * ), TAU( * ), WORK( * )
177 parameter ( zero = 0.0e+0, one = 1.0e+0 )
180 LOGICAL LQUERY, WANTQ
181 INTEGER I, IINFO, J, LWKOPT, MN
198 wantq = lsame( vect,
'Q' )
200 lquery = ( lwork.EQ.-1 )
201 IF( .NOT.wantq .AND. .NOT.lsame( vect,
'P' ) )
THEN
203 ELSE IF( m.LT.0 )
THEN
205 ELSE IF( n.LT.0 .OR. ( wantq .AND. ( n.GT.m .OR. n.LT.min( m,
206 $ k ) ) ) .OR. ( .NOT.wantq .AND. ( m.GT.n .OR. m.LT.
207 $ min( n, k ) ) ) )
THEN
209 ELSE IF( k.LT.0 )
THEN
211 ELSE IF( lda.LT.max( 1, m ) )
THEN
213 ELSE IF( lwork.LT.max( 1, mn ) .AND. .NOT.lquery )
THEN
221 CALL sorgqr( m, n, k, a, lda, tau, work, -1, iinfo )
224 CALL sorgqr( m-1, m-1, m-1, a( 2, 2 ), lda, tau, work,
230 CALL sorglq( m, n, k, a, lda, tau, work, -1, iinfo )
233 CALL sorglq( n-1, n-1, n-1, a( 2, 2 ), lda, tau, work,
239 lwkopt = max(lwkopt, mn)
243 CALL xerbla(
'SORGBR', -info )
245 ELSE IF( lquery )
THEN
252 IF( m.EQ.0 .OR. n.EQ.0 )
THEN
266 CALL sorgqr( m, n, k, a, lda, tau, work, lwork, iinfo )
279 a( i, j ) = a( i, j-1 )
290 CALL sorgqr( m-1, m-1, m-1, a( 2, 2 ), lda, tau, work,
303 CALL sorglq( m, n, k, a, lda, tau, work, lwork, iinfo )
318 DO 50 i = j - 1, 2, -1
319 a( i, j ) = a( i-1, j )
327 CALL sorglq( n-1, n-1, n-1, a( 2, 2 ), lda, tau, work,
subroutine sorglq(M, N, K, A, LDA, TAU, WORK, LWORK, INFO)
SORGLQ
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine sorgqr(M, N, K, A, LDA, TAU, WORK, LWORK, INFO)
SORGQR
subroutine sorgbr(VECT, M, N, K, A, LDA, TAU, WORK, LWORK, INFO)
SORGBR