166 SUBROUTINE zgehrd( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
173 INTEGER IHI, ILO, INFO, LDA, LWORK, N
176 COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
182 INTEGER NBMAX, LDT, TSIZE
183 parameter( nbmax = 64, ldt = nbmax+1,
184 $ tsize = ldt*nbmax )
186 parameter( zero = ( 0.0d+0, 0.0d+0 ),
187 $ one = ( 1.0d+0, 0.0d+0 ) )
191 INTEGER I, IB, IINFO, IWT, J, LDWORK, LWKOPT, NB,
211 lquery = ( lwork.EQ.-1 )
214 ELSE IF( ilo.LT.1 .OR. ilo.GT.max( 1, n ) )
THEN
216 ELSE IF( ihi.LT.min( ilo, n ) .OR. ihi.GT.n )
THEN
218 ELSE IF( lda.LT.max( 1, n ) )
THEN
220 ELSE IF( lwork.LT.max( 1, n ) .AND. .NOT.lquery )
THEN
228 nb = min( nbmax, ilaenv( 1,
'ZGEHRD',
' ', n, ilo, ihi, -1 ) )
229 lwkopt = n*nb + tsize
234 CALL xerbla(
'ZGEHRD', -info )
236 ELSE IF( lquery )
THEN
245 DO 20 i = max( 1, ihi ), n - 1
259 nb = min( nbmax, ilaenv( 1,
'ZGEHRD',
' ', n, ilo, ihi, -1 ) )
261 IF( nb.GT.1 .AND. nb.LT.nh )
THEN
266 nx = max( nb, ilaenv( 3,
'ZGEHRD',
' ', n, ilo, ihi, -1 ) )
271 IF( lwork.LT.n*nb+tsize )
THEN
277 nbmin = max( 2, ilaenv( 2,
'ZGEHRD',
' ', n, ilo, ihi,
279 IF( lwork.GE.(n*nbmin + tsize) )
THEN
280 nb = (lwork-tsize) / n
289 IF( nb.LT.nbmin .OR. nb.GE.nh )
THEN
300 DO 40 i = ilo, ihi - 1 - nx, nb
301 ib = min( nb, ihi-i )
307 CALL zlahr2( ihi, i, ib, a( 1, i ), lda, tau( i ),
308 $ work( iwt ), ldt, work, ldwork )
314 ei = a( i+ib, i+ib-1 )
315 a( i+ib, i+ib-1 ) = one
316 CALL zgemm(
'No transpose',
'Conjugate transpose',
318 $ ib, -one, work, ldwork, a( i+ib, i ), lda, one,
319 $ a( 1, i+ib ), lda )
320 a( i+ib, i+ib-1 ) = ei
325 CALL ztrmm(
'Right',
'Lower',
'Conjugate transpose',
327 $ one, a( i+1, i ), lda, work, ldwork )
329 CALL zaxpy( i, -one, work( ldwork*j+1 ), 1,
336 CALL zlarfb(
'Left',
'Conjugate transpose',
'Forward',
338 $ ihi-i, n-i-ib+1, ib, a( i+1, i ), lda,
339 $ work( iwt ), ldt, a( i+1, i+ib ), lda,
346 CALL zgehd2( n, i, ihi, a, lda, tau, work, iinfo )
subroutine xerbla(srname, info)
subroutine zaxpy(n, za, zx, incx, zy, incy)
ZAXPY
subroutine zgehd2(n, ilo, ihi, a, lda, tau, work, info)
ZGEHD2 reduces a general square matrix to upper Hessenberg form using an unblocked algorithm.
subroutine zgehrd(n, ilo, ihi, a, lda, tau, work, lwork, info)
ZGEHRD
subroutine zgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
ZGEMM
subroutine zlahr2(n, k, nb, a, lda, tau, t, ldt, y, ldy)
ZLAHR2 reduces the specified number of first columns of a general rectangular matrix A so that elemen...
subroutine zlarfb(side, trans, direct, storev, m, n, k, v, ldv, t, ldt, c, ldc, work, ldwork)
ZLARFB applies a block reflector or its conjugate-transpose to a general rectangular matrix.
subroutine ztrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
ZTRMM