162 SUBROUTINE dlaeda( N, TLVLS, CURLVL, CURPBM, PRMPTR, PERM,
164 $ GIVCOL, GIVNUM, Q, QPTR, Z, ZTEMP, INFO )
171 INTEGER CURLVL, CURPBM, INFO, N, TLVLS
174 INTEGER GIVCOL( 2, * ), GIVPTR( * ), PERM( * ),
175 $ PRMPTR( * ), QPTR( * )
176 DOUBLE PRECISION GIVNUM( 2, * ), Q( * ), Z( * ), ZTEMP( * )
182 DOUBLE PRECISION ZERO, HALF, ONE
183 PARAMETER ( ZERO = 0.0d0, half = 0.5d0, one = 1.0d0 )
186 INTEGER BSIZ1, BSIZ2, CURR, I, K, MID, PSIZ1, PSIZ2,
193 INTRINSIC dble, int, sqrt
205 CALL xerbla(
'DLAEDA', -info )
225 curr = ptr + curpbm*2**curlvl + 2**( curlvl-1 ) - 1
231 bsiz1 = int( half+sqrt( dble( qptr( curr+1 )-qptr( curr ) ) ) )
232 bsiz2 = int( half+sqrt( dble( qptr( curr+2 )-qptr( curr+1 ) ) ) )
233 DO 10 k = 1, mid - bsiz1 - 1
236 CALL dcopy( bsiz1, q( qptr( curr )+bsiz1-1 ), bsiz1,
237 $ z( mid-bsiz1 ), 1 )
238 CALL dcopy( bsiz2, q( qptr( curr+1 ) ), bsiz2, z( mid ), 1 )
239 DO 20 k = mid + bsiz2, n
248 DO 70 k = 1, curlvl - 1
249 curr = ptr + curpbm*2**( curlvl-k ) + 2**( curlvl-k-1 ) - 1
250 psiz1 = prmptr( curr+1 ) - prmptr( curr )
251 psiz2 = prmptr( curr+2 ) - prmptr( curr+1 )
256 DO 30 i = givptr( curr ), givptr( curr+1 ) - 1
257 CALL drot( 1, z( zptr1+givcol( 1, i )-1 ), 1,
258 $ z( zptr1+givcol( 2, i )-1 ), 1, givnum( 1, i ),
261 DO 40 i = givptr( curr+1 ), givptr( curr+2 ) - 1
262 CALL drot( 1, z( mid-1+givcol( 1, i ) ), 1,
263 $ z( mid-1+givcol( 2, i ) ), 1, givnum( 1, i ),
266 psiz1 = prmptr( curr+1 ) - prmptr( curr )
267 psiz2 = prmptr( curr+2 ) - prmptr( curr+1 )
268 DO 50 i = 0, psiz1 - 1
269 ztemp( i+1 ) = z( zptr1+perm( prmptr( curr )+i )-1 )
271 DO 60 i = 0, psiz2 - 1
272 ztemp( psiz1+i+1 ) = z( mid+perm( prmptr( curr+1 )+i )-1 )
281 bsiz1 = int( half+sqrt( dble( qptr( curr+1 )-qptr( curr ) ) ) )
282 bsiz2 = int( half+sqrt( dble( qptr( curr+2 )-qptr( curr+
284 IF( bsiz1.GT.0 )
THEN
285 CALL dgemv(
'T', bsiz1, bsiz1, one, q( qptr( curr ) ),
286 $ bsiz1, ztemp( 1 ), 1, zero, z( zptr1 ), 1 )
288 CALL dcopy( psiz1-bsiz1, ztemp( bsiz1+1 ), 1,
291 IF( bsiz2.GT.0 )
THEN
292 CALL dgemv(
'T', bsiz2, bsiz2, one, q( qptr( curr+1 ) ),
293 $ bsiz2, ztemp( psiz1+1 ), 1, zero, z( mid ), 1 )
295 CALL dcopy( psiz2-bsiz2, ztemp( psiz1+bsiz2+1 ), 1,
296 $ z( mid+bsiz2 ), 1 )
298 ptr = ptr + 2**( tlvls-k )
subroutine dlaeda(n, tlvls, curlvl, curpbm, prmptr, perm, givptr, givcol, givnum, q, qptr, z, ztemp, info)
DLAEDA used by DSTEDC. Computes the Z vector determining the rank-one modification of the diagonal ma...