204 SUBROUTINE cgebrd( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK,
212 INTEGER INFO, LDA, LWORK, M, N
216 COMPLEX A( LDA, * ), TAUP( * ), TAUQ( * ),
224 parameter( one = ( 1.0e+0, 0.0e+0 ) )
228 INTEGER I, IINFO, J, LDWRKX, LDWRKY, LWKOPT, MINMN, NB,
235 INTRINSIC max, min, real
246 nb = max( 1, ilaenv( 1,
'CGEBRD',
' ', m, n, -1, -1 ) )
248 work( 1 ) = real( lwkopt )
249 lquery = ( lwork.EQ.-1 )
252 ELSE IF( n.LT.0 )
THEN
254 ELSE IF( lda.LT.max( 1, m ) )
THEN
256 ELSE IF( lwork.LT.max( 1, m, n ) .AND. .NOT.lquery )
THEN
260 CALL xerbla(
'CGEBRD', -info )
262 ELSE IF( lquery )
THEN
269 IF( minmn.EQ.0 )
THEN
278 IF( nb.GT.1 .AND. nb.LT.minmn )
THEN
282 nx = max( nb, ilaenv( 3,
'CGEBRD',
' ', m, n, -1, -1 ) )
286 IF( nx.LT.minmn )
THEN
288 IF( lwork.LT.ws )
THEN
293 nbmin = ilaenv( 2,
'CGEBRD',
' ', m, n, -1, -1 )
294 IF( lwork.GE.( m+n )*nbmin )
THEN
306 DO 30 i = 1, minmn - nx, nb
312 CALL clabrd( m-i+1, n-i+1, nb, a( i, i ), lda, d( i ), e( i ),
313 $ tauq( i ), taup( i ), work, ldwrkx,
314 $ work( ldwrkx*nb+1 ), ldwrky )
319 CALL cgemm(
'No transpose',
'Conjugate transpose', m-i-nb+1,
320 $ n-i-nb+1, nb, -one, a( i+nb, i ), lda,
321 $ work( ldwrkx*nb+nb+1 ), ldwrky, one,
322 $ a( i+nb, i+nb ), lda )
323 CALL cgemm(
'No transpose',
'No transpose', m-i-nb+1, n-i-nb+1,
324 $ nb, -one, work( nb+1 ), ldwrkx, a( i, i+nb ), lda,
325 $ one, a( i+nb, i+nb ), lda )
330 DO 10 j = i, i + nb - 1
335 DO 20 j = i, i + nb - 1
344 CALL cgebd2( m-i+1, n-i+1, a( i, i ), lda, d( i ), e( i ),
345 $ tauq( i ), taup( i ), work, iinfo )
subroutine xerbla(srname, info)
subroutine cgebd2(m, n, a, lda, d, e, tauq, taup, work, info)
CGEBD2 reduces a general matrix to bidiagonal form using an unblocked algorithm.
subroutine cgebrd(m, n, a, lda, d, e, tauq, taup, work, lwork, info)
CGEBRD
subroutine cgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
CGEMM
subroutine clabrd(m, n, nb, a, lda, d, e, tauq, taup, x, ldx, y, ldy)
CLABRD reduces the first nb rows and columns of a general matrix to a bidiagonal form.