127 SUBROUTINE dorghr( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
135 INTEGER ihi, ilo, info, lda, lwork, n
138 DOUBLE PRECISION a( lda, * ), tau( * ), work( * )
144 DOUBLE PRECISION zero, one
145 parameter( zero = 0.0d+0, one = 1.0d+0 )
149 INTEGER i, iinfo, j, lwkopt, nb, nh
167 lquery = ( lwork.EQ.-1 )
170 ELSE IF( ilo.LT.1 .OR. ilo.GT.max( 1, n ) )
THEN
172 ELSE IF( ihi.LT.min( ilo, n ) .OR. ihi.GT.n )
THEN
174 ELSE IF( lda.LT.max( 1, n ) )
THEN
176 ELSE IF( lwork.LT.max( 1, nh ) .AND. .NOT.lquery )
THEN
181 nb =
ilaenv( 1,
'DORGQR',
' ', nh, nh, nh, -1 )
182 lwkopt = max( 1, nh )*nb
187 CALL
xerbla(
'DORGHR', -info )
189 ELSE IF( lquery )
THEN
204 DO 40 j = ihi, ilo + 1, -1
209 a( i, j ) = a( i, j-1 )
232 CALL
dorgqr( nh, nh, nh, a( ilo+1, ilo+1 ), lda, tau( ilo ),
233 $ work, lwork, iinfo )