202 SUBROUTINE zgebrd( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK,
210 INTEGER INFO, LDA, LWORK, M, N
213 DOUBLE PRECISION D( * ), E( * )
214 COMPLEX*16 A( LDA, * ), TAUP( * ), TAUQ( * ), WORK( * )
221 parameter( one = ( 1.0d+0, 0.0d+0 ) )
225 INTEGER I, IINFO, J, LDWRKX, LDWRKY, LWKMIN, LWKOPT,
226 $ minmn, nb, nbmin, nx, ws
232 INTRINSIC dble, max, min
244 IF( minmn.EQ.0 )
THEN
249 nb = max( 1, ilaenv( 1,
'ZGEBRD',
' ', m, n, -1, -1 ) )
252 work( 1 ) = dble( 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(
'ZGEBRD', -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,
'ZGEBRD',
' ', m, n, -1, -1 ) )
290 IF( nx.LT.minmn )
THEN
292 IF( lwork.LT.ws )
THEN
297 nbmin = ilaenv( 2,
'ZGEBRD',
' ', m, n, -1, -1 )
298 IF( lwork.GE.( m+n )*nbmin )
THEN
310 DO 30 i = 1, minmn - nx, nb
316 CALL zlabrd( 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 zgemm(
'No transpose',
'Conjugate transpose', m-i-nb+1,
325 $ n-i-nb+1, nb, -one, a( i+nb, i ), lda,
326 $ work( ldwrkx*nb+nb+1 ), ldwrky, one,
327 $ a( i+nb, i+nb ), lda )
328 CALL zgemm(
'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 zgebd2( m-i+1, n-i+1, a( i, i ), lda, d( i ), e( i ),
351 $ tauq( i ), taup( i ), work, iinfo )
subroutine zgebd2(m, n, a, lda, d, e, tauq, taup, work, info)
ZGEBD2 reduces a general matrix to bidiagonal form using an unblocked algorithm.
subroutine zgebrd(m, n, a, lda, d, e, tauq, taup, work, lwork, info)
ZGEBRD
subroutine zgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
ZGEMM
subroutine zlabrd(m, n, nb, a, lda, d, e, tauq, taup, x, ldx, y, ldy)
ZLABRD reduces the first nb rows and columns of a general matrix to a bidiagonal form.