158 SUBROUTINE dorgbr( VECT, M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
167 INTEGER INFO, K, LDA, LWORK, M, N
170 DOUBLE PRECISION A( lda, * ), TAU( * ), WORK( * )
176 DOUBLE PRECISION ZERO, ONE
177 parameter ( zero = 0.0d+0, one = 1.0d+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 dorgqr( m, n, k, a, lda, tau, work, -1, iinfo )
224 CALL dorgqr( m-1, m-1, m-1, a( 2, 2 ), lda, tau, work,
230 CALL dorglq( m, n, k, a, lda, tau, work, -1, iinfo )
233 CALL dorglq( n-1, n-1, n-1, a( 2, 2 ), lda, tau, work,
239 lwkopt = max(lwkopt, mn)
243 CALL xerbla(
'DORGBR', -info )
245 ELSE IF( lquery )
THEN
252 IF( m.EQ.0 .OR. n.EQ.0 )
THEN
266 CALL dorgqr( m, n, k, a, lda, tau, work, lwork, iinfo )
279 a( i, j ) = a( i, j-1 )
290 CALL dorgqr( m-1, m-1, m-1, a( 2, 2 ), lda, tau, work,
303 CALL dorglq( 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 dorglq( n-1, n-1, n-1, a( 2, 2 ), lda, tau, work,
subroutine dorglq(M, N, K, A, LDA, TAU, WORK, LWORK, INFO)
DORGLQ
subroutine dorgqr(M, N, K, A, LDA, TAU, WORK, LWORK, INFO)
DORGQR
subroutine dorgbr(VECT, M, N, K, A, LDA, TAU, WORK, LWORK, INFO)
DORGBR
subroutine xerbla(SRNAME, INFO)
XERBLA