124 SUBROUTINE cungtr( UPLO, N, A, LDA, TAU, WORK, LWORK, INFO )
133 INTEGER INFO, LDA, LWORK, N
136 COMPLEX A( lda, * ), TAU( * ), WORK( * )
143 parameter ( zero = ( 0.0e+0, 0.0e+0 ),
144 $ one = ( 1.0e+0, 0.0e+0 ) )
147 LOGICAL LQUERY, UPPER
148 INTEGER I, IINFO, J, LWKOPT, NB
153 EXTERNAL ilaenv, lsame
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,
'CUNGQL',
' ', n-1, n-1, n-1, -1 )
182 nb = ilaenv( 1,
'CUNGQR',
' ', n-1, n-1, n-1, -1 )
184 lwkopt = max( 1, n-1 )*nb
189 CALL xerbla(
'CUNGTR', -info )
191 ELSE IF( lquery )
THEN
212 a( i, j ) = a( i, j+1 )
223 CALL cungql( n-1, n-1, n-1, a, lda, tau, work, lwork, iinfo )
236 a( i, j ) = a( i, j-1 )
247 CALL cungqr( n-1, n-1, n-1, a( 2, 2 ), lda, tau, work,
subroutine cungtr(UPLO, N, A, LDA, TAU, WORK, LWORK, INFO)
CUNGTR
subroutine cungql(M, N, K, A, LDA, TAU, WORK, LWORK, INFO)
CUNGQL
subroutine cungqr(M, N, K, A, LDA, TAU, WORK, LWORK, INFO)
CUNGQR
subroutine xerbla(SRNAME, INFO)
XERBLA