122 SUBROUTINE cungtr( UPLO, N, A, LDA, TAU, WORK, LWORK, INFO )
130 INTEGER INFO, LDA, LWORK, N
133 COMPLEX A( LDA, * ), TAU( * ), WORK( * )
140 parameter( zero = ( 0.0e+0, 0.0e+0 ),
141 $ one = ( 1.0e+0, 0.0e+0 ) )
144 LOGICAL LQUERY, UPPER
145 INTEGER I, IINFO, J, LWKOPT, NB
151 EXTERNAL ilaenv, lsame, sroundup_lwork
164 lquery = ( lwork.EQ.-1 )
165 upper = lsame( uplo,
'U' )
166 IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
168 ELSE IF( n.LT.0 )
THEN
170 ELSE IF( lda.LT.max( 1, n ) )
THEN
172 ELSE IF( lwork.LT.max( 1, n-1 ) .AND. .NOT.lquery )
THEN
178 nb = ilaenv( 1,
'CUNGQL',
' ', n-1, n-1, n-1, -1 )
180 nb = ilaenv( 1,
'CUNGQR',
' ', n-1, n-1, n-1, -1 )
182 lwkopt = max( 1, n-1 )*nb
183 work( 1 ) = sroundup_lwork(lwkopt)
187 CALL xerbla(
'CUNGTR', -info )
189 ELSE IF( lquery )
THEN
210 a( i, j ) = a( i, j+1 )
221 CALL cungql( n-1, n-1, n-1, a, lda, tau, work, lwork, iinfo )
234 a( i, j ) = a( i, j-1 )
245 CALL cungqr( n-1, n-1, n-1, a( 2, 2 ), lda, tau, work,
249 work( 1 ) = sroundup_lwork(lwkopt)
subroutine xerbla(srname, info)
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 cungtr(uplo, n, a, lda, tau, work, lwork, info)
CUNGTR