156 SUBROUTINE zungbr( VECT, M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
164 INTEGER INFO, K, LDA, LWORK, M, N
167 COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
174 parameter( zero = ( 0.0d+0, 0.0d+0 ),
175 $ one = ( 1.0d+0, 0.0d+0 ) )
178 LOGICAL LQUERY, WANTQ
179 INTEGER I, IINFO, J, LWKOPT, MN
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 zungqr( m, n, k, a, lda, tau, work, -1, iinfo )
222 CALL zungqr( m-1, m-1, m-1, a, lda, tau, work, -1,
228 CALL zunglq( m, n, k, a, lda, tau, work, -1, iinfo )
231 CALL zunglq( n-1, n-1, n-1, a, lda, tau, work, -1,
236 lwkopt = int( dble( work( 1 ) ) )
237 lwkopt = max(lwkopt, mn)
241 CALL xerbla(
'ZUNGBR', -info )
243 ELSE IF( lquery )
THEN
250 IF( m.EQ.0 .OR. n.EQ.0 )
THEN
264 CALL zungqr( m, n, k, a, lda, tau, work, lwork, iinfo )
277 a( i, j ) = a( i, j-1 )
288 CALL zungqr( m-1, m-1, m-1, a( 2, 2 ), lda, tau, work,
301 CALL zunglq( 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 zunglq( n-1, n-1, n-1, a( 2, 2 ), lda, tau, work,
subroutine xerbla(srname, info)
subroutine zungbr(vect, m, n, k, a, lda, tau, work, lwork, info)
ZUNGBR
subroutine zunglq(m, n, k, a, lda, tau, work, lwork, info)
ZUNGLQ
subroutine zungqr(m, n, k, a, lda, tau, work, lwork, info)
ZUNGQR