166 SUBROUTINE cgehrd( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
173 INTEGER IHI, ILO, INFO, LDA, LWORK, N
176 COMPLEX A( LDA, * ), TAU( * ), WORK( * )
182 INTEGER NBMAX, LDT, TSIZE
183 parameter( nbmax = 64, ldt = nbmax+1,
184 $ tsize = ldt*nbmax )
186 parameter( zero = ( 0.0e+0, 0.0e+0 ),
187 $ one = ( 1.0e+0, 0.0e+0 ) )
191 INTEGER I, IB, IINFO, IWT, J, LDWORK, LWKOPT, NB,
205 EXTERNAL ilaenv, sroundup_lwork
212 lquery = ( lwork.EQ.-1 )
215 ELSE IF( ilo.LT.1 .OR. ilo.GT.max( 1, n ) )
THEN
217 ELSE IF( ihi.LT.min( ilo, n ) .OR. ihi.GT.n )
THEN
219 ELSE IF( lda.LT.max( 1, n ) )
THEN
221 ELSE IF( lwork.LT.max( 1, n ) .AND. .NOT.lquery )
THEN
229 nb = min( nbmax, ilaenv( 1,
'CGEHRD',
' ', n, ilo, ihi, -1 ) )
230 lwkopt = n*nb + tsize
231 work( 1 ) = sroundup_lwork(lwkopt)
235 CALL xerbla(
'CGEHRD', -info )
237 ELSE IF( lquery )
THEN
246 DO 20 i = max( 1, ihi ), n - 1
260 nb = min( nbmax, ilaenv( 1,
'CGEHRD',
' ', n, ilo, ihi, -1 ) )
262 IF( nb.GT.1 .AND. nb.LT.nh )
THEN
267 nx = max( nb, ilaenv( 3,
'CGEHRD',
' ', n, ilo, ihi, -1 ) )
272 IF( lwork.LT.n*nb+tsize )
THEN
278 nbmin = max( 2, ilaenv( 2,
'CGEHRD',
' ', n, ilo, ihi,
280 IF( lwork.GE.(n*nbmin+tsize) )
THEN
281 nb = (lwork-tsize) / n
290 IF( nb.LT.nbmin .OR. nb.GE.nh )
THEN
301 DO 40 i = ilo, ihi - 1 - nx, nb
302 ib = min( nb, ihi-i )
308 CALL clahr2( ihi, i, ib, a( 1, i ), lda, tau( i ),
309 $ work( iwt ), ldt, work, ldwork )
315 ei = a( i+ib, i+ib-1 )
316 a( i+ib, i+ib-1 ) = one
317 CALL cgemm(
'No transpose',
'Conjugate transpose',
319 $ ib, -one, work, ldwork, a( i+ib, i ), lda, one,
320 $ a( 1, i+ib ), lda )
321 a( i+ib, i+ib-1 ) = ei
326 CALL ctrmm(
'Right',
'Lower',
'Conjugate transpose',
328 $ one, a( i+1, i ), lda, work, ldwork )
330 CALL caxpy( i, -one, work( ldwork*j+1 ), 1,
337 CALL clarfb(
'Left',
'Conjugate transpose',
'Forward',
339 $ ihi-i, n-i-ib+1, ib, a( i+1, i ), lda,
340 $ work( iwt ), ldt, a( i+1, i+ib ), lda,
347 CALL cgehd2( n, i, ihi, a, lda, tau, work, iinfo )
348 work( 1 ) = sroundup_lwork(lwkopt)
subroutine xerbla(srname, info)
subroutine caxpy(n, ca, cx, incx, cy, incy)
CAXPY
subroutine cgehd2(n, ilo, ihi, a, lda, tau, work, info)
CGEHD2 reduces a general square matrix to upper Hessenberg form using an unblocked algorithm.
subroutine cgehrd(n, ilo, ihi, a, lda, tau, work, lwork, info)
CGEHRD
subroutine cgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
CGEMM
subroutine clahr2(n, k, nb, a, lda, tau, t, ldt, y, ldy)
CLAHR2 reduces the specified number of first columns of a general rectangular matrix A so that elemen...
subroutine clarfb(side, trans, direct, storev, m, n, k, v, ldv, t, ldt, c, ldc, work, ldwork)
CLARFB applies a block reflector or its conjugate-transpose to a general rectangular matrix.
subroutine ctrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
CTRMM