164 SUBROUTINE dgehrd( N, ILO, IHI, A, LDA, TAU, WORK, LWORK,
172 INTEGER IHI, ILO, INFO, LDA, LWORK, N
175 DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
181 INTEGER NBMAX, LDT, TSIZE
182 parameter( nbmax = 64, ldt = nbmax+1,
183 $ tsize = ldt*nbmax )
184 DOUBLE PRECISION ZERO, ONE
185 parameter( zero = 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,
'DGEHRD',
' ', n, ilo, ihi,
234 lwkopt = n*nb + tsize
240 CALL xerbla(
'DGEHRD', -info )
242 ELSE IF( lquery )
THEN
251 DO 20 i = max( 1, ihi ), n - 1
264 nb = min( nbmax, ilaenv( 1,
'DGEHRD',
' ', n, ilo, ihi, -1 ) )
266 IF( nb.GT.1 .AND. nb.LT.nh )
THEN
271 nx = max( nb, ilaenv( 3,
'DGEHRD',
' ', n, ilo, ihi, -1 ) )
276 IF( lwork.LT.lwkopt )
THEN
282 nbmin = max( 2, ilaenv( 2,
'DGEHRD',
' ', 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 dlahr2( 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 dgemm(
'No transpose',
'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 dtrmm(
'Right',
'Lower',
'Transpose',
332 $ one, a( i+1, i ), lda, work, ldwork )
334 CALL daxpy( i, -one, work( ldwork*j+1 ), 1,
341 CALL dlarfb(
'Left',
'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 dgehd2( n, i, ihi, a, lda, tau, work, iinfo )
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 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