312 SUBROUTINE dlasd6( ICOMPQ, NL, NR, SQRE, D, VF, VL, ALPHA, BETA,
313 $ idxq, perm, givptr, givcol, ldgcol, givnum,
314 $ ldgnum, poles, difl, difr, z, k, c, s, work,
323 INTEGER givptr, icompq, info, k, ldgcol, ldgnum, nl,
325 DOUBLE PRECISION alpha, beta, c, s
328 INTEGER givcol( ldgcol, * ), idxq( * ), iwork( * ),
330 DOUBLE PRECISION d( * ), difl( * ), difr( * ),
331 $ givnum( ldgnum, * ), poles( ldgnum, * ),
332 $ vf( * ), vl( * ), work( * ), z( * )
338 DOUBLE PRECISION one, zero
339 parameter( one = 1.0d+0, zero = 0.0d+0 )
342 INTEGER i, idx, idxc, idxp, isigma, ivfw, ivlw, iw, m,
344 DOUBLE PRECISION orgnrm
360 IF( ( icompq.LT.0 ) .OR. ( icompq.GT.1 ) )
THEN
362 ELSE IF( nl.LT.1 )
THEN
364 ELSE IF( nr.LT.1 )
THEN
366 ELSE IF( ( sqre.LT.0 ) .OR. ( sqre.GT.1 ) )
THEN
368 ELSE IF( ldgcol.LT.n )
THEN
370 ELSE IF( ldgnum.LT.n )
THEN
374 CALL
xerbla(
'DLASD6', -info )
393 orgnrm = max( abs( alpha ), abs( beta ) )
396 IF( abs( d( i ) ).GT.orgnrm )
THEN
397 orgnrm = abs( d( i ) )
400 CALL
dlascl(
'G', 0, 0, orgnrm, one, n, 1, d, n, info )
401 alpha = alpha / orgnrm
406 CALL
dlasd7( icompq, nl, nr, sqre, k, d, z, work( iw ), vf,
407 $ work( ivfw ), vl, work( ivlw ), alpha, beta,
408 $ work( isigma ), iwork( idx ), iwork( idxp ), idxq,
409 $ perm, givptr, givcol, ldgcol, givnum, ldgnum, c, s,
414 CALL
dlasd8( icompq, k, d, z, vf, vl, difl, difr, ldgnum,
415 $ work( isigma ), work( iw ), info )
420 CALL
xerbla(
'DLASD8', -info )
426 IF( icompq.EQ.1 )
THEN
427 CALL
dcopy( k, d, 1, poles( 1, 1 ), 1 )
428 CALL
dcopy( k, work( isigma ), 1, poles( 1, 2 ), 1 )
433 CALL
dlascl(
'G', 0, 0, one, orgnrm, n, 1, d, n, info )
439 CALL
dlamrg( n1, n2, d, 1, -1, idxq )