168 SUBROUTINE zgehrd( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
176 INTEGER IHI, ILO, INFO, LDA, LWORK, N
179 COMPLEX*16 A( lda, * ), TAU( * ), WORK( * )
185 INTEGER NBMAX, LDT, TSIZE
186 parameter ( nbmax = 64, ldt = nbmax+1,
187 $ tsize = ldt*nbmax )
189 parameter ( zero = ( 0.0d+0, 0.0d+0 ),
190 $ one = ( 1.0d+0, 0.0d+0 ) )
194 INTEGER I, IB, IINFO, IWT, J, LDWORK, LWKOPT, NB,
214 lquery = ( lwork.EQ.-1 )
217 ELSE IF( ilo.LT.1 .OR. ilo.GT.max( 1, n ) )
THEN
219 ELSE IF( ihi.LT.min( ilo, n ) .OR. ihi.GT.n )
THEN
221 ELSE IF( lda.LT.max( 1, n ) )
THEN
223 ELSE IF( lwork.LT.max( 1, n ) .AND. .NOT.lquery )
THEN
231 nb = min( nbmax, ilaenv( 1,
'ZGEHRD',
' ', n, ilo, ihi, -1 ) )
232 lwkopt = n*nb + tsize
237 CALL xerbla(
'ZGEHRD', -info )
239 ELSE IF( lquery )
THEN
248 DO 20 i = max( 1, ihi ), n - 1
262 nb = min( nbmax, ilaenv( 1,
'ZGEHRD',
' ', n, ilo, ihi, -1 ) )
264 IF( nb.GT.1 .AND. nb.LT.nh )
THEN
269 nx = max( nb, ilaenv( 3,
'ZGEHRD',
' ', n, ilo, ihi, -1 ) )
274 IF( lwork.LT.n*nb+tsize )
THEN
280 nbmin = max( 2, ilaenv( 2,
'ZGEHRD',
' ', n, ilo, ihi,
282 IF( lwork.GE.(n*nbmin + tsize) )
THEN
283 nb = (lwork-tsize) / n
292 IF( nb.LT.nbmin .OR. nb.GE.nh )
THEN
303 DO 40 i = ilo, ihi - 1 - nx, nb
304 ib = min( nb, ihi-i )
310 CALL zlahr2( ihi, i, ib, a( 1, i ), lda, tau( i ),
311 $ work( iwt ), ldt, work, ldwork )
317 ei = a( i+ib, i+ib-1 )
318 a( i+ib, i+ib-1 ) = one
319 CALL zgemm(
'No transpose',
'Conjugate transpose',
321 $ ib, -one, work, ldwork, a( i+ib, i ), lda, one,
322 $ a( 1, i+ib ), lda )
323 a( i+ib, i+ib-1 ) = ei
328 CALL ztrmm(
'Right',
'Lower',
'Conjugate transpose',
330 $ one, a( i+1, i ), lda, work, ldwork )
332 CALL zaxpy( i, -one, work( ldwork*j+1 ), 1,
339 CALL zlarfb(
'Left',
'Conjugate transpose',
'Forward',
341 $ ihi-i, n-i-ib+1, ib, a( i+1, i ), lda,
342 $ work( iwt ), ldt, a( i+1, i+ib ), lda,
349 CALL zgehd2( n, i, ihi, a, lda, tau, work, iinfo )
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 xerbla(SRNAME, INFO)
XERBLA
subroutine ztrmm(SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)
ZTRMM
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 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 zgehd2(N, ILO, IHI, A, LDA, TAU, WORK, INFO)
ZGEHD2 reduces a general square matrix to upper Hessenberg form using an unblocked algorithm...
subroutine zaxpy(N, ZA, ZX, INCX, ZY, INCY)
ZAXPY