168 SUBROUTINE sgehrd( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
176 INTEGER IHI, ILO, INFO, LDA, LWORK, N
179 REAL 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,
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,
'SGEHRD',
' ', n, ilo, ihi, -1 ) )
232 lwkopt = n*nb + tsize
237 CALL xerbla(
'SGEHRD', -info )
239 ELSE IF( lquery )
THEN
248 DO 20 i = max( 1, ihi ), n - 1
262 nb = min( nbmax, ilaenv( 1,
'SGEHRD',
' ', n, ilo, ihi, -1 ) )
264 IF( nb.GT.1 .AND. nb.LT.nh )
THEN
269 nx = max( nb, ilaenv( 3,
'SGEHRD',
' ', n, ilo, ihi, -1 ) )
274 IF( lwork.LT.n*nb+tsize )
THEN
280 nbmin = max( 2, ilaenv( 2,
'SGEHRD',
' ', 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 slahr2( 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 sgemm(
'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 strmm(
'Right',
'Lower',
'Transpose',
330 $ one, a( i+1, i ), lda, work, ldwork )
332 CALL saxpy( i, -one, work( ldwork*j+1 ), 1,
339 CALL slarfb(
'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 sgehd2( n, i, ihi, a, lda, tau, work, iinfo )
subroutine sgehrd(N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO)
SGEHRD
subroutine sgemm(TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
SGEMM
subroutine slahr2(N, K, NB, A, LDA, TAU, T, LDT, Y, LDY)
SLAHR2 reduces the specified number of first columns of a general rectangular matrix A so that elemen...
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine strmm(SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)
STRMM
subroutine saxpy(N, SA, SX, INCX, SY, INCY)
SAXPY
subroutine slarfb(SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV, T, LDT, C, LDC, WORK, LDWORK)
SLARFB applies a block reflector or its transpose to a general rectangular matrix.
subroutine sgehd2(N, ILO, IHI, A, LDA, TAU, WORK, INFO)
SGEHD2 reduces a general square matrix to upper Hessenberg form using an unblocked algorithm...