218 SUBROUTINE stgexc( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
219 $ LDZ, IFST, ILST, WORK, LWORK, INFO )
227 INTEGER IFST, ILST, INFO, LDA, LDB, LDQ, LDZ, LWORK, N
230 REAL A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
231 $ work( * ), z( ldz, * )
238 parameter( zero = 0.0e+0 )
242 INTEGER HERE, LWMIN, NBF, NBL, NBNEXT
246 EXTERNAL sroundup_lwork
259 lquery = ( lwork.EQ.-1 )
262 ELSE IF( lda.LT.max( 1, n ) )
THEN
264 ELSE IF( ldb.LT.max( 1, n ) )
THEN
266 ELSE IF( ldq.LT.1 .OR. wantq .AND. ( ldq.LT.max( 1, n ) ) )
THEN
268 ELSE IF( ldz.LT.1 .OR. wantz .AND. ( ldz.LT.max( 1, n ) ) )
THEN
270 ELSE IF( ifst.LT.1 .OR. ifst.GT.n )
THEN
272 ELSE IF( ilst.LT.1 .OR. ilst.GT.n )
THEN
284 IF (lwork.LT.lwmin .AND. .NOT.lquery)
THEN
290 CALL xerbla(
'STGEXC', -info )
292 ELSE IF( lquery )
THEN
305 IF( a( ifst, ifst-1 ).NE.zero )
310 IF( a( ifst+1, ifst ).NE.zero )
318 IF( a( ilst, ilst-1 ).NE.zero )
323 IF( a( ilst+1, ilst ).NE.zero )
329 IF( ifst.LT.ilst )
THEN
333 IF( nbf.EQ.2 .AND. nbl.EQ.1 )
335 IF( nbf.EQ.1 .AND. nbl.EQ.2 )
344 IF( nbf.EQ.1 .OR. nbf.EQ.2 )
THEN
349 IF( here+nbf+1.LE.n )
THEN
350 IF( a( here+nbf+1, here+nbf ).NE.zero )
353 CALL stgex2( wantq, wantz, n, a, lda, b, ldb, q, ldq, z,
354 $ ldz, here, nbf, nbnext, work, lwork, info )
364 IF( a( here+1, here ).EQ.zero )
374 IF( here+3.LE.n )
THEN
375 IF( a( here+3, here+2 ).NE.zero )
378 CALL stgex2( wantq, wantz, n, a, lda, b, ldb, q, ldq, z,
379 $ ldz, here+1, 1, nbnext, work, lwork, info )
384 IF( nbnext.EQ.1 )
THEN
388 CALL stgex2( wantq, wantz, n, a, lda, b, ldb, q, ldq, z,
389 $ ldz, here, 1, 1, work, lwork, info )
400 IF( a( here+2, here+1 ).EQ.zero )
402 IF( nbnext.EQ.2 )
THEN
406 CALL stgex2( wantq, wantz, n, a, lda, b, ldb, q, ldq,
407 $ z, ldz, here, 1, nbnext, work, lwork,
418 CALL stgex2( wantq, wantz, n, a, lda, b, ldb, q, ldq,
419 $ z, ldz, here, 1, 1, work, lwork, info )
425 CALL stgex2( wantq, wantz, n, a, lda, b, ldb, q, ldq,
426 $ z, ldz, here, 1, 1, work, lwork, info )
445 IF( nbf.EQ.1 .OR. nbf.EQ.2 )
THEN
451 IF( a( here-1, here-2 ).NE.zero )
454 CALL stgex2( wantq, wantz, n, a, lda, b, ldb, q, ldq, z,
455 $ ldz, here-nbnext, nbnext, nbf, work, lwork,
466 IF( a( here+1, here ).EQ.zero )
477 IF( a( here-1, here-2 ).NE.zero )
480 CALL stgex2( wantq, wantz, n, a, lda, b, ldb, q, ldq, z,
481 $ ldz, here-nbnext, nbnext, 1, work, lwork,
487 IF( nbnext.EQ.1 )
THEN
491 CALL stgex2( wantq, wantz, n, a, lda, b, ldb, q, ldq, z,
492 $ ldz, here, nbnext, 1, work, lwork, info )
502 IF( a( here, here-1 ).EQ.zero )
504 IF( nbnext.EQ.2 )
THEN
508 CALL stgex2( wantq, wantz, n, a, lda, b, ldb, q, ldq,
509 $ z, ldz, here-1, 2, 1, work, lwork, info )
519 CALL stgex2( wantq, wantz, n, a, lda, b, ldb, q, ldq,
520 $ z, ldz, here, 1, 1, work, lwork, info )
526 CALL stgex2( wantq, wantz, n, a, lda, b, ldb, q, ldq,
527 $ z, ldz, here, 1, 1, work, lwork, info )
540 work( 1 ) = sroundup_lwork(lwmin)
subroutine xerbla(srname, info)
subroutine stgex2(wantq, wantz, n, a, lda, b, ldb, q, ldq, z, ldz, j1, n1, n2, work, lwork, info)
STGEX2 swaps adjacent diagonal blocks in an upper (quasi) triangular matrix pair by an orthogonal equ...
subroutine stgexc(wantq, wantz, n, a, lda, b, ldb, q, ldq, z, ldz, ifst, ilst, work, lwork, info)
STGEXC