127 SUBROUTINE cunghr( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
135 INTEGER ihi, ilo, info, lda, lwork, n
138 COMPLEX a( lda, * ), tau( * ), work( * )
145 parameter( zero = ( 0.0e+0, 0.0e+0 ),
146 $ one = ( 1.0e+0, 0.0e+0 ) )
150 INTEGER i, iinfo, j, lwkopt, nb, nh
168 lquery = ( lwork.EQ.-1 )
171 ELSE IF( ilo.LT.1 .OR. ilo.GT.max( 1, n ) )
THEN
173 ELSE IF( ihi.LT.min( ilo, n ) .OR. ihi.GT.n )
THEN
175 ELSE IF( lda.LT.max( 1, n ) )
THEN
177 ELSE IF( lwork.LT.max( 1, nh ) .AND. .NOT.lquery )
THEN
182 nb =
ilaenv( 1,
'CUNGQR',
' ', nh, nh, nh, -1 )
183 lwkopt = max( 1, nh )*nb
188 CALL
xerbla(
'CUNGHR', -info )
190 ELSE IF( lquery )
THEN
205 DO 40 j = ihi, ilo + 1, -1
210 a( i, j ) = a( i, j-1 )
233 CALL
cungqr( nh, nh, nh, a( ilo+1, ilo+1 ), lda, tau( ilo ),
234 $ work, lwork, iinfo )