124 SUBROUTINE zungtr( UPLO, N, A, LDA, TAU, WORK, LWORK, INFO )
133 INTEGER info, lda, lwork, n
136 COMPLEX*16 a( lda, * ), tau( * ), work( * )
143 parameter( zero = ( 0.0d+0, 0.0d+0 ),
144 $ one = ( 1.0d+0, 0.0d+0 ) )
147 LOGICAL lquery, upper
148 INTEGER i, iinfo, j, lwkopt, nb
166 lquery = ( lwork.EQ.-1 )
167 upper =
lsame( uplo,
'U' )
168 IF( .NOT.upper .AND. .NOT.
lsame( uplo,
'L' ) )
THEN
170 ELSE IF( n.LT.0 )
THEN
172 ELSE IF( lda.LT.max( 1, n ) )
THEN
174 ELSE IF( lwork.LT.max( 1, n-1 ) .AND. .NOT.lquery )
THEN
180 nb =
ilaenv( 1,
'ZUNGQL',
' ', n-1, n-1, n-1, -1 )
182 nb =
ilaenv( 1,
'ZUNGQR',
' ', n-1, n-1, n-1, -1 )
184 lwkopt = max( 1, n-1 )*nb
189 CALL
xerbla(
'ZUNGTR', -info )
191 ELSE IF( lquery )
THEN
212 a( i, j ) = a( i, j+1 )
223 CALL
zungql( n-1, n-1, n-1, a, lda, tau, work, lwork, iinfo )
236 a( i, j ) = a( i, j-1 )
247 CALL
zungqr( n-1, n-1, n-1, a( 2, 2 ), lda, tau, work,