1 SUBROUTINE bslaexc( N, T, LDT, J1, N1, N2, ITRAF, DTRAF, WORK,
10 INTEGER INFO, J1, LDT, N, N1, N2
14 REAL DTRAF( * ), T( LDT, * ), WORK( * )
83 parameter( zero = 0.0e+0, one = 1.0e+0 )
85 parameter( ten = 10.0 )
87 parameter( ldd = 4, ldx = 2 )
90 INTEGER IERR, J2, J3, J4, K, LD, LI, ND
91 REAL CS, DNORM, EPS, SCALE, SMLNUM, SN, T11, T22,
92 $ t33, tau, tau1, tau2, temp, thresh, wi1, wi2,
96 REAL D( LDD, 4 ), X( LDX, 2 )
100 EXTERNAL slamch, slange
103 EXTERNAL slamov, slanv2, slarfg, slarfx, slartg, slasy2,
115 IF( n.EQ.0 .OR. n1.EQ.0 .OR. n2.EQ.0 )
124 IF( n1.EQ.1 .AND. n2.EQ.1 )
THEN
133 CALL slartg( t( j1, j2 ), t22-t11, cs, sn, temp )
138 $
CALL srot( n-j1-1, t( j1, j3 ), ldt, t( j2, j3 ), ldt, cs,
140 CALL srot( j1-1, t( 1, j1 ), 1, t( 1, j2 ), 1, cs, sn )
157 CALL slamov(
'Full', nd, nd, t( j1, j1 ), ldt, d, ldd )
158 dnorm = slange(
'Max', nd, nd, d, ldd, work )
164 smlnum = slamch(
'S' ) / eps
165 thresh =
max( ten*eps*dnorm, smlnum )
169 CALL slasy2( .false., .false., -1, n1, n2, d, ldd,
170 $ d( n1+1, n1+1 ), ldd, d( 1, n1+1 ), ldd, scale, x,
176 GO TO ( 10, 20, 30 )k
185 dtraf( 2 ) = x( 1, 1 )
186 dtraf( 3 ) = x( 1, 2 )
187 CALL slarfg( 3, dtraf( 3 ), dtraf, 1, tau )
193 CALL slarfx(
'Left', 3, 3, dtraf, tau, d, ldd, work )
194 CALL slarfx(
'Right', 3, 3, dtraf, tau, d, ldd, work )
198 IF(
max( abs( d( 3, 1 ) ), abs( d( 3, 2 ) ), abs( d( 3,
199 $ 3 )-t11 ) ).GT.thresh )
GO TO 50
203 CALL slarfx(
'Left', 3, n-j1+1, dtraf, tau, t( j1, j1 ), ldt,
205 CALL slarfx(
'Right', j2, 3, dtraf, tau, t( 1, j1 ), ldt,
212 itraf( 1 ) = 2*n + j1
226 dtraf( 1 ) = -x( 1, 1 )
227 dtraf( 2 ) = -x( 2, 1 )
229 CALL slarfg( 3, dtraf( 1 ), dtraf( 2 ), 1, tau )
235 CALL slarfx(
'Left', 3, 3, dtraf, tau, d, ldd, work )
236 CALL slarfx(
'Right', 3, 3, dtraf, tau, d, ldd, work )
240 IF(
max( abs( d( 2, 1 ) ), abs( d( 3, 1 ) ), abs( d( 1,
241 $ 1 )-t33 ) ).GT.thresh )
GO TO 50
245 CALL slarfx(
'Right', j3, 3, dtraf, tau, t( 1, j1 ), ldt,
247 CALL slarfx(
'Left', 3, n-j1, dtraf, tau, t( j1, j2 ), ldt,
270 dtraf( 1 ) = -x( 1, 1 )
271 dtraf( 2 ) = -x( 2, 1 )
273 CALL slarfg( 3, dtraf( 1 ), dtraf( 2 ), 1, tau1 )
276 temp = -tau1*( x( 1, 2 )+dtraf( 2 )*x( 2, 2 ) )
277 dtraf( 4 ) = -temp*dtraf( 2 ) - x( 2, 2 )
278 dtraf( 5 ) = -temp*dtraf( 3 )
280 CALL slarfg( 3, dtraf( 4 ), dtraf( 5 ), 1, tau2 )
285 CALL slarfx(
'Left', 3, 4, dtraf, tau1, d, ldd, work )
286 CALL slarfx(
'Right', 4, 3, dtraf, tau1, d, ldd, work )
287 CALL slarfx(
'Left', 3, 4, dtraf( 4 ), tau2, d( 2, 1 ), ldd,
289 CALL slarfx(
'Right', 4, 3, dtraf( 4 ), tau2, d( 1, 2 ), ldd,
294 IF(
max( abs( d( 3, 1 ) ), abs( d( 3, 2 ) ), abs( d( 4, 1 ) ),
295 $ abs( d( 4, 2 ) ) ).GT.thresh )
GO TO 50
299 CALL slarfx(
'Left', 3, n-j1+1, dtraf, tau1, t( j1, j1 ), ldt,
301 CALL slarfx(
'Right', j4, 3, dtraf, tau1, t( 1, j1 ), ldt,
303 CALL slarfx(
'Left', 3, n-j1+1, dtraf( 4 ), tau2, t( j2, j1 ),
305 CALL slarfx(
'Right', j4, 3, dtraf( 4 ), tau2, t( 1, j2 ), ldt,
327 CALL slanv2( t( j1, j1 ), t( j1, j2 ), t( j2, j1 ),
328 $ t( j2, j2 ), wr1, wi1, wr2, wi2, cs, sn )
329 CALL srot( n-j1-1, t( j1, j1+2 ), ldt, t( j2, j1+2 ), ldt,
331 CALL srot( j1-1, t( 1, j1 ), 1, t( 1, j2 ), 1, cs, sn )
345 CALL slanv2( t( j3, j3 ), t( j3, j4 ), t( j4, j3 ),
346 $ t( j4, j4 ), wr1, wi1, wr2, wi2, cs, sn )
348 $
CALL srot( n-j3-1, t( j3, j3+2 ), ldt, t( j4, j3+2 ),
350 CALL srot( j3-1, t( 1, j3 ), 1, t( 1, j4 ), 1, cs, sn )