206 SUBROUTINE cgebrd( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK,
215 INTEGER info, lda, lwork, m, n
219 COMPLEX a( lda, * ), taup( * ), tauq( * ),
227 parameter( one = ( 1.0e+0, 0.0e+0 ) )
231 INTEGER i, iinfo, j, ldwrkx, ldwrky, lwkopt, minmn, nb,
239 INTRINSIC max, min, real
250 nb = max( 1,
ilaenv( 1,
'CGEBRD',
' ', m, n, -1, -1 ) )
252 work( 1 ) =
REAL( lwkopt )
253 lquery = ( lwork.EQ.-1 )
256 ELSE IF( n.LT.0 )
THEN
258 ELSE IF( lda.LT.max( 1, m ) )
THEN
260 ELSE IF( lwork.LT.max( 1, m, n ) .AND. .NOT.lquery )
THEN
264 CALL
xerbla(
'CGEBRD', -info )
266 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,
'CGEBRD',
' ', m, n, -1, -1 ) )
290 IF( nx.LT.minmn )
THEN
292 IF( lwork.LT.ws )
THEN
297 nbmin =
ilaenv( 2,
'CGEBRD',
' ', m, n, -1, -1 )
298 IF( lwork.GE.( m+n )*nbmin )
THEN
310 DO 30 i = 1, minmn - nx, nb
316 CALL
clabrd( m-i+1, n-i+1, nb, a( i, i ), lda, d( i ), e( i ),
317 $ tauq( i ), taup( i ), work, ldwrkx,
318 $ work( ldwrkx*nb+1 ), ldwrky )
323 CALL
cgemm(
'No transpose',
'Conjugate transpose', m-i-nb+1,
324 $ n-i-nb+1, nb, -one, a( i+nb, i ), lda,
325 $ work( ldwrkx*nb+nb+1 ), ldwrky, one,
326 $ a( i+nb, i+nb ), lda )
327 CALL
cgemm(
'No transpose',
'No transpose', m-i-nb+1, n-i-nb+1,
328 $ nb, -one, work( nb+1 ), ldwrkx, a( i, i+nb ), lda,
329 $ one, a( i+nb, i+nb ), lda )
334 DO 10 j = i, i + nb - 1
339 DO 20 j = i, i + nb - 1
348 CALL
cgebd2( m-i+1, n-i+1, a( i, i ), lda, d( i ), e( i ),
349 $ tauq( i ), taup( i ), work, iinfo )