262 SUBROUTINE ctrsen( JOB, COMPQ, SELECT, N, T, LDT, Q, LDQ, W, M, S,
263 $ SEP, WORK, LWORK, INFO )
271 INTEGER INFO, LDQ, LDT, LWORK, M, N
276 COMPLEX Q( LDQ, * ), T( LDT, * ), W( * ), WORK( * )
283 parameter( zero = 0.0e+0, one = 1.0e+0 )
286 LOGICAL LQUERY, WANTBH, WANTQ, WANTS, WANTSP
287 INTEGER IERR, K, KASE, KS, LWMIN, N1, N2, NN
288 REAL EST, RNORM, SCALE
296 REAL CLANGE, SROUNDUP_LWORK
297 EXTERNAL lsame, clange, sroundup_lwork
309 wantbh = lsame( job,
'B' )
310 wants = lsame( job,
'E' ) .OR. wantbh
311 wantsp = lsame( job,
'V' ) .OR. wantbh
312 wantq = lsame( compq,
'V' )
327 lquery = ( lwork.EQ.-1 )
330 lwmin = max( 1, 2*nn )
331 ELSE IF( lsame( job,
'N' ) )
THEN
333 ELSE IF( lsame( job,
'E' ) )
THEN
337 IF( .NOT.lsame( job,
'N' ) .AND. .NOT.wants .AND. .NOT.wantsp )
340 ELSE IF( .NOT.lsame( compq,
'N' ) .AND. .NOT.wantq )
THEN
342 ELSE IF( n.LT.0 )
THEN
344 ELSE IF( ldt.LT.max( 1, n ) )
THEN
346 ELSE IF( ldq.LT.1 .OR. ( wantq .AND. ldq.LT.n ) )
THEN
348 ELSE IF( lwork.LT.lwmin .AND. .NOT.lquery )
THEN
353 work( 1 ) = sroundup_lwork(lwmin)
357 CALL xerbla(
'CTRSEN', -info )
359 ELSE IF( lquery )
THEN
365 IF( m.EQ.n .OR. m.EQ.0 )
THEN
369 $ sep = clange(
'1', n, n, t, ldt, rwork )
377 IF(
SELECT( k ) )
THEN
383 $
CALL ctrexc( compq, n, t, ldt, q, ldq, k, ks, ierr )
393 CALL clacpy(
'F', n1, n2, t( 1, n1+1 ), ldt, work, n1 )
394 CALL ctrsyl(
'N',
'N', -1, n1, n2, t, ldt, t( n1+1, n1+1 ),
395 $ ldt, work, n1, scale, ierr )
400 rnorm = clange(
'F', n1, n2, work, n1, rwork )
401 IF( rnorm.EQ.zero )
THEN
404 s = scale / ( sqrt( scale*scale / rnorm+rnorm )*
416 CALL clacn2( nn, work( nn+1 ), work, est, kase, isave )
422 CALL ctrsyl(
'N',
'N', -1, n1, n2, t, ldt,
423 $ t( n1+1, n1+1 ), ldt, work, n1, scale,
429 CALL ctrsyl(
'C',
'C', -1, n1, n2, t, ldt,
430 $ t( n1+1, n1+1 ), ldt, work, n1, scale,
447 work( 1 ) = sroundup_lwork(lwmin)
subroutine xerbla(srname, info)
subroutine clacn2(n, v, x, est, kase, isave)
CLACN2 estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vec...
subroutine clacpy(uplo, m, n, a, lda, b, ldb)
CLACPY copies all or part of one two-dimensional array to another.
subroutine ctrexc(compq, n, t, ldt, q, ldq, ifst, ilst, info)
CTREXC
subroutine ctrsen(job, compq, select, n, t, ldt, q, ldq, w, m, s, sep, work, lwork, info)
CTRSEN
subroutine ctrsyl(trana, tranb, isgn, m, n, a, lda, b, ldb, c, ldc, scale, info)
CTRSYL