203 SUBROUTINE dgebrd( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK,
211 INTEGER INFO, LDA, LWORK, M, N
214 DOUBLE PRECISION A( LDA, * ), D( * ), E( * ), TAUP( * ),
215 $ tauq( * ), work( * )
222 parameter( one = 1.0d+0 )
226 INTEGER I, IINFO, J, LDWRKX, LDWRKY, LWKOPT, MINMN, NB,
233 INTRINSIC dble, max, min
244 nb = max( 1, ilaenv( 1,
'DGEBRD',
' ', m, n, -1, -1 ) )
246 work( 1 ) = dble( lwkopt )
247 lquery = ( lwork.EQ.-1 )
250 ELSE IF( n.LT.0 )
THEN
252 ELSE IF( lda.LT.max( 1, m ) )
THEN
254 ELSE IF( lwork.LT.max( 1, m, n ) .AND. .NOT.lquery )
THEN
258 CALL xerbla(
'DGEBRD', -info )
260 ELSE IF( lquery )
THEN
267 IF( minmn.EQ.0 )
THEN
276 IF( nb.GT.1 .AND. nb.LT.minmn )
THEN
280 nx = max( nb, ilaenv( 3,
'DGEBRD',
' ', m, n, -1, -1 ) )
284 IF( nx.LT.minmn )
THEN
286 IF( lwork.LT.ws )
THEN
291 nbmin = ilaenv( 2,
'DGEBRD',
' ', m, n, -1, -1 )
292 IF( lwork.GE.( m+n )*nbmin )
THEN
304 DO 30 i = 1, minmn - nx, nb
310 CALL dlabrd( m-i+1, n-i+1, nb, a( i, i ), lda, d( i ), e( i ),
311 $ tauq( i ), taup( i ), work, ldwrkx,
312 $ work( ldwrkx*nb+1 ), ldwrky )
317 CALL dgemm(
'No transpose',
'Transpose', m-i-nb+1, n-i-nb+1,
318 $ nb, -one, a( i+nb, i ), lda,
319 $ work( ldwrkx*nb+nb+1 ), ldwrky, one,
320 $ a( i+nb, i+nb ), lda )
321 CALL dgemm(
'No transpose',
'No transpose', m-i-nb+1, n-i-nb+1,
322 $ nb, -one, work( nb+1 ), ldwrkx, a( i, i+nb ), lda,
323 $ one, a( i+nb, i+nb ), lda )
328 DO 10 j = i, i + nb - 1
333 DO 20 j = i, i + nb - 1
342 CALL dgebd2( m-i+1, n-i+1, a( i, i ), lda, d( i ), e( i ),
343 $ tauq( i ), taup( i ), work, iinfo )
subroutine xerbla(srname, info)
subroutine dgebd2(m, n, a, lda, d, e, tauq, taup, work, info)
DGEBD2 reduces a general matrix to bidiagonal form using an unblocked algorithm.
subroutine dgebrd(m, n, a, lda, d, e, tauq, taup, work, lwork, info)
DGEBRD
subroutine dgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
DGEMM
subroutine dlabrd(m, n, nb, a, lda, d, e, tauq, taup, x, ldx, y, ldy)
DLABRD reduces the first nb rows and columns of a general matrix to a bidiagonal form.