203 SUBROUTINE sgebrd( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK,
211 INTEGER INFO, LDA, LWORK, M, N
214 REAL A( LDA, * ), D( * ), E( * ), TAUP( * ),
215 $ tauq( * ), work( * )
222 parameter( one = 1.0e+0 )
226 INTEGER I, IINFO, J, LDWRKX, LDWRKY, LWKOPT, MINMN, NB,
238 EXTERNAL ilaenv, sroundup_lwork
245 nb = max( 1, ilaenv( 1,
'SGEBRD',
' ', m, n, -1, -1 ) )
247 work( 1 ) = sroundup_lwork(lwkopt)
248 lquery = ( lwork.EQ.-1 )
251 ELSE IF( n.LT.0 )
THEN
253 ELSE IF( lda.LT.max( 1, m ) )
THEN
255 ELSE IF( lwork.LT.max( 1, m, n ) .AND. .NOT.lquery )
THEN
259 CALL xerbla(
'SGEBRD', -info )
261 ELSE IF( lquery )
THEN
268 IF( minmn.EQ.0 )
THEN
277 IF( nb.GT.1 .AND. nb.LT.minmn )
THEN
281 nx = max( nb, ilaenv( 3,
'SGEBRD',
' ', m, n, -1, -1 ) )
285 IF( nx.LT.minmn )
THEN
287 IF( lwork.LT.ws )
THEN
292 nbmin = ilaenv( 2,
'SGEBRD',
' ', m, n, -1, -1 )
293 IF( lwork.GE.( m+n )*nbmin )
THEN
305 DO 30 i = 1, minmn - nx, nb
311 CALL slabrd( m-i+1, n-i+1, nb, a( i, i ), lda, d( i ), e( i ),
312 $ tauq( i ), taup( i ), work, ldwrkx,
313 $ work( ldwrkx*nb+1 ), ldwrky )
318 CALL sgemm(
'No transpose',
'Transpose', m-i-nb+1, n-i-nb+1,
319 $ nb, -one, a( i+nb, i ), lda,
320 $ work( ldwrkx*nb+nb+1 ), ldwrky, one,
321 $ a( i+nb, i+nb ), lda )
322 CALL sgemm(
'No transpose',
'No transpose', m-i-nb+1, n-i-nb+1,
323 $ nb, -one, work( nb+1 ), ldwrkx, a( i, i+nb ), lda,
324 $ one, a( i+nb, i+nb ), lda )
329 DO 10 j = i, i + nb - 1
334 DO 20 j = i, i + nb - 1
343 CALL sgebd2( m-i+1, n-i+1, a( i, i ), lda, d( i ), e( i ),
344 $ tauq( i ), taup( i ), work, iinfo )
345 work( 1 ) = sroundup_lwork(ws)
subroutine xerbla(srname, info)
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.