166 SUBROUTINE dgehrd( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
173 INTEGER IHI, ILO, INFO, LDA, LWORK, N
176 DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
182 INTEGER NBMAX, LDT, TSIZE
183 parameter( nbmax = 64, ldt = nbmax+1,
184 $ tsize = ldt*nbmax )
185 DOUBLE PRECISION ZERO, ONE
186 parameter( zero = 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,
'DGEHRD',
' ', n, ilo, ihi, -1 ) )
229 lwkopt = n*nb + tsize
234 CALL xerbla(
'DGEHRD', -info )
236 ELSE IF( lquery )
THEN
245 DO 20 i = max( 1, ihi ), n - 1
259 nb = min( nbmax, ilaenv( 1,
'DGEHRD',
' ', n, ilo, ihi, -1 ) )
261 IF( nb.GT.1 .AND. nb.LT.nh )
THEN
266 nx = max( nb, ilaenv( 3,
'DGEHRD',
' ', n, ilo, ihi, -1 ) )
271 IF( lwork.LT.n*nb+tsize )
THEN
277 nbmin = max( 2, ilaenv( 2,
'DGEHRD',
' ', 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 dlahr2( 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 dgemm(
'No transpose',
'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 dtrmm(
'Right',
'Lower',
'Transpose',
327 $ one, a( i+1, i ), lda, work, ldwork )
329 CALL daxpy( i, -one, work( ldwork*j+1 ), 1,
336 CALL dlarfb(
'Left',
'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 dgehd2( n, i, ihi, a, lda, tau, work, iinfo )
subroutine xerbla(srname, info)
subroutine daxpy(n, da, dx, incx, dy, incy)
DAXPY
subroutine dgehd2(n, ilo, ihi, a, lda, tau, work, info)
DGEHD2 reduces a general square matrix to upper Hessenberg form using an unblocked algorithm.
subroutine dgehrd(n, ilo, ihi, a, lda, tau, work, lwork, info)
DGEHRD
subroutine dgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
DGEMM
subroutine dlahr2(n, k, nb, a, lda, tau, t, ldt, y, ldy)
DLAHR2 reduces the specified number of first columns of a general rectangular matrix A so that elemen...
subroutine dlarfb(side, trans, direct, storev, m, n, k, v, ldv, t, ldt, c, ldc, work, ldwork)
DLARFB applies a block reflector or its transpose to a general rectangular matrix.
subroutine dtrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
DTRMM