168 SUBROUTINE dgehrd( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
176 INTEGER IHI, ILO, INFO, LDA, LWORK, N
179 DOUBLE PRECISION A( lda, * ), TAU( * ), WORK( * )
185 INTEGER NBMAX, LDT, TSIZE
186 parameter ( nbmax = 64, ldt = nbmax+1,
187 $ tsize = ldt*nbmax )
188 DOUBLE PRECISION ZERO, ONE
189 parameter ( zero = 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,
'DGEHRD',
' ', n, ilo, ihi, -1 ) )
232 lwkopt = n*nb + tsize
237 CALL xerbla(
'DGEHRD', -info )
239 ELSE IF( lquery )
THEN
248 DO 20 i = max( 1, ihi ), n - 1
262 nb = min( nbmax, ilaenv( 1,
'DGEHRD',
' ', n, ilo, ihi, -1 ) )
264 IF( nb.GT.1 .AND. nb.LT.nh )
THEN
269 nx = max( nb, ilaenv( 3,
'DGEHRD',
' ', n, ilo, ihi, -1 ) )
274 IF( lwork.LT.n*nb+tsize )
THEN
280 nbmin = max( 2, ilaenv( 2,
'DGEHRD',
' ', 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 dlahr2( 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 dgemm(
'No transpose',
'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 dtrmm(
'Right',
'Lower',
'Transpose',
330 $ one, a( i+1, i ), lda, work, ldwork )
332 CALL daxpy( i, -one, work( ldwork*j+1 ), 1,
339 CALL dlarfb(
'Left',
'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 dgehd2( n, i, ihi, a, lda, tau, work, iinfo )
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
subroutine dgehrd(N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO)
DGEHRD
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 daxpy(N, DA, DX, INCX, DY, INCY)
DAXPY
subroutine dgemm(TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
DGEMM
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine dgehd2(N, ILO, IHI, A, LDA, TAU, WORK, INFO)
DGEHD2 reduces a general square matrix to upper Hessenberg form using an unblocked algorithm...