202 SUBROUTINE sgebrd( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK,
210 INTEGER INFO, LDA, LWORK, M, N
213 REAL A( LDA, * ), D( * ), E( * ), TAUP( * ),
214 $ tauq( * ), work( * )
221 parameter( one = 1.0e+0 )
225 INTEGER I, IINFO, J, LDWRKX, LDWRKY, LWKMIN, LWKOPT,
226 $ minmn, nb, nbmin, nx, ws
237 EXTERNAL ilaenv, sroundup_lwork
245 IF( minmn.EQ.0 )
THEN
250 nb = max( 1, ilaenv( 1,
'SGEBRD',
' ', m, n, -1, -1 ) )
253 work( 1 ) = sroundup_lwork( lwkopt )
254 lquery = ( lwork.EQ.-1 )
257 ELSE IF( n.LT.0 )
THEN
259 ELSE IF( lda.LT.max( 1, m ) )
THEN
261 ELSE IF( lwork.LT.lwkmin .AND. .NOT.lquery )
THEN
265 CALL xerbla(
'SGEBRD', -info )
267 ELSE IF( lquery )
THEN
273 IF( minmn.EQ.0 )
THEN
282 IF( nb.GT.1 .AND. nb.LT.minmn )
THEN
286 nx = max( nb, ilaenv( 3,
'SGEBRD',
' ', m, n, -1, -1 ) )
290 IF( nx.LT.minmn )
THEN
292 IF( lwork.LT.ws )
THEN
297 nbmin = ilaenv( 2,
'SGEBRD',
' ', m, n, -1, -1 )
298 IF( lwork.GE.( m+n )*nbmin )
THEN
310 DO 30 i = 1, minmn - nx, nb
316 CALL slabrd( m-i+1, n-i+1, nb, a( i, i ), lda, d( i ),
318 $ tauq( i ), taup( i ), work, ldwrkx,
319 $ work( ldwrkx*nb+1 ), ldwrky )
324 CALL sgemm(
'No transpose',
'Transpose', m-i-nb+1, n-i-nb+1,
325 $ nb, -one, a( i+nb, i ), lda,
326 $ work( ldwrkx*nb+nb+1 ), ldwrky, one,
327 $ a( i+nb, i+nb ), lda )
328 CALL sgemm(
'No transpose',
'No transpose', m-i-nb+1,
330 $ nb, -one, work( nb+1 ), ldwrkx, a( i, i+nb ), lda,
331 $ one, a( i+nb, i+nb ), lda )
336 DO 10 j = i, i + nb - 1
341 DO 20 j = i, i + nb - 1
350 CALL sgebd2( m-i+1, n-i+1, a( i, i ), lda, d( i ), e( i ),
351 $ tauq( i ), taup( i ), work, iinfo )
353 work( 1 ) = sroundup_lwork( ws )
subroutine sgebd2(m, n, a, lda, d, e, tauq, taup, work, info)
SGEBD2 reduces a general matrix to bidiagonal form using an unblocked algorithm.
subroutine sgebrd(m, n, a, lda, d, e, tauq, taup, work, lwork, info)
SGEBRD
subroutine sgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
SGEMM
subroutine slabrd(m, n, nb, a, lda, d, e, tauq, taup, x, ldx, y, ldy)
SLABRD reduces the first nb rows and columns of a general matrix to a bidiagonal form.