123 SUBROUTINE cunghr( N, ILO, IHI, A, LDA, TAU, WORK, LWORK,
131 INTEGER IHI, ILO, INFO, LDA, LWORK, N
134 COMPLEX A( LDA, * ), TAU( * ), WORK( * )
141 parameter( zero = ( 0.0e+0, 0.0e+0 ),
142 $ one = ( 1.0e+0, 0.0e+0 ) )
146 INTEGER I, IINFO, J, LWKOPT, NB, NH
154 EXTERNAL ilaenv, sroundup_lwork
165 lquery = ( lwork.EQ.-1 )
168 ELSE IF( ilo.LT.1 .OR. ilo.GT.max( 1, n ) )
THEN
170 ELSE IF( ihi.LT.min( ilo, n ) .OR. ihi.GT.n )
THEN
172 ELSE IF( lda.LT.max( 1, n ) )
THEN
174 ELSE IF( lwork.LT.max( 1, nh ) .AND. .NOT.lquery )
THEN
179 nb = ilaenv( 1,
'CUNGQR',
' ', nh, nh, nh, -1 )
180 lwkopt = max( 1, nh )*nb
181 work( 1 ) = sroundup_lwork(lwkopt)
185 CALL xerbla(
'CUNGHR', -info )
187 ELSE IF( lquery )
THEN
202 DO 40 j = ihi, ilo + 1, -1
207 a( i, j ) = a( i, j-1 )
230 CALL cungqr( nh, nh, nh, a( ilo+1, ilo+1 ), lda, tau( ilo ),
231 $ work, lwork, iinfo )
233 work( 1 ) = sroundup_lwork(lwkopt)
subroutine cunghr(n, ilo, ihi, a, lda, tau, work, lwork, info)
CUNGHR
subroutine cungqr(m, n, k, a, lda, tau, work, lwork, info)
CUNGQR