168 SUBROUTINE cgehrd( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
176 INTEGER IHI, ILO, INFO, LDA, LWORK, N
179 COMPLEX A( lda, * ), TAU( * ), WORK( * )
185 INTEGER NBMAX, LDT, TSIZE
186 parameter ( nbmax = 64, ldt = nbmax+1,
187 $ tsize = ldt*nbmax )
189 parameter ( zero = ( 0.0e+0, 0.0e+0 ),
190 $ one = ( 1.0e+0, 0.0e+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,
'CGEHRD',
' ', n, ilo, ihi, -1 ) )
232 lwkopt = n*nb + tsize
237 CALL xerbla(
'CGEHRD', -info )
239 ELSE IF( lquery )
THEN
248 DO 20 i = max( 1, ihi ), n - 1
262 nb = min( nbmax, ilaenv( 1,
'CGEHRD',
' ', n, ilo, ihi, -1 ) )
264 IF( nb.GT.1 .AND. nb.LT.nh )
THEN
269 nx = max( nb, ilaenv( 3,
'CGEHRD',
' ', n, ilo, ihi, -1 ) )
274 IF( lwork.LT.n*nb+tsize )
THEN
280 nbmin = max( 2, ilaenv( 2,
'CGEHRD',
' ', 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 clahr2( 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 cgemm(
'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 ctrmm(
'Right',
'Lower',
'Conjugate transpose',
330 $ one, a( i+1, i ), lda, work, ldwork )
332 CALL caxpy( i, -one, work( ldwork*j+1 ), 1,
339 CALL clarfb(
'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 cgehd2( n, i, ihi, a, lda, tau, work, iinfo )
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 xerbla(SRNAME, INFO)
XERBLA
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
subroutine cgehrd(N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO)
CGEHRD
subroutine caxpy(N, CA, CX, INCX, CY, INCY)
CAXPY
subroutine cgemm(TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
CGEMM