164 SUBROUTINE zgehrd( N, ILO, IHI, A, LDA, TAU, WORK, LWORK,
172 INTEGER IHI, ILO, INFO, LDA, LWORK, N
175 COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
181 INTEGER NBMAX, LDT, TSIZE
182 parameter( nbmax = 64, ldt = nbmax+1,
183 $ tsize = ldt*nbmax )
185 parameter( zero = ( 0.0d+0, 0.0d+0 ),
186 $ one = ( 1.0d+0, 0.0d+0 ) )
190 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
232 nb = min( nbmax, ilaenv( 1,
'ZGEHRD',
' ', n, ilo, ihi,
234 lwkopt = n*nb + tsize
240 CALL xerbla(
'ZGEHRD', -info )
242 ELSE IF( lquery )
THEN
251 DO 20 i = max( 1, ihi ), n - 1
264 nb = min( nbmax, ilaenv( 1,
'ZGEHRD',
' ', n, ilo, ihi, -1 ) )
266 IF( nb.GT.1 .AND. nb.LT.nh )
THEN
271 nx = max( nb, ilaenv( 3,
'ZGEHRD',
' ', n, ilo, ihi, -1 ) )
276 IF( lwork.LT.lwkopt )
THEN
282 nbmin = max( 2, ilaenv( 2,
'ZGEHRD',
' ', n, ilo, ihi,
284 IF( lwork.GE.(n*nbmin + tsize) )
THEN
285 nb = (lwork-tsize) / n
294 IF( nb.LT.nbmin .OR. nb.GE.nh )
THEN
305 DO 40 i = ilo, ihi - 1 - nx, nb
306 ib = min( nb, ihi-i )
312 CALL zlahr2( ihi, i, ib, a( 1, i ), lda, tau( i ),
313 $ work( iwt ), ldt, work, ldwork )
319 ei = a( i+ib, i+ib-1 )
320 a( i+ib, i+ib-1 ) = one
321 CALL zgemm(
'No transpose',
'Conjugate transpose',
323 $ ib, -one, work, ldwork, a( i+ib, i ), lda, one,
324 $ a( 1, i+ib ), lda )
325 a( i+ib, i+ib-1 ) = ei
330 CALL ztrmm(
'Right',
'Lower',
'Conjugate transpose',
332 $ one, a( i+1, i ), lda, work, ldwork )
334 CALL zaxpy( i, -one, work( ldwork*j+1 ), 1,
341 CALL zlarfb(
'Left',
'Conjugate transpose',
'Forward',
343 $ ihi-i, n-i-ib+1, ib, a( i+1, i ), lda,
344 $ work( iwt ), ldt, a( i+1, i+ib ), lda,
351 CALL zgehd2( n, i, ihi, a, lda, tau, work, iinfo )
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 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.