164 SUBROUTINE dlaeda( N, TLVLS, CURLVL, CURPBM, PRMPTR, PERM, GIVPTR,
165 $ GIVCOL, GIVNUM, Q, QPTR, Z, ZTEMP, INFO )
172 INTEGER CURLVL, CURPBM, INFO, N, TLVLS
175 INTEGER GIVCOL( 2, * ), GIVPTR( * ), PERM( * ),
176 $ prmptr( * ), qptr( * )
177 DOUBLE PRECISION GIVNUM( 2, * ), Q( * ), Z( * ), ZTEMP( * )
183 DOUBLE PRECISION ZERO, HALF, ONE
184 parameter( zero = 0.0d0, half = 0.5d0, one = 1.0d0 )
187 INTEGER BSIZ1, BSIZ2, CURR, I, K, MID, PSIZ1, PSIZ2,
194 INTRINSIC dble, int, sqrt
206 CALL xerbla(
'DLAEDA', -info )
226 curr = ptr + curpbm*2**curlvl + 2**( curlvl-1 ) - 1
232 bsiz1 = int( half+sqrt( dble( qptr( curr+1 )-qptr( curr ) ) ) )
233 bsiz2 = int( half+sqrt( dble( qptr( curr+2 )-qptr( curr+1 ) ) ) )
234 DO 10 k = 1, mid - bsiz1 - 1
237 CALL dcopy( bsiz1, q( qptr( curr )+bsiz1-1 ), bsiz1,
238 $ z( mid-bsiz1 ), 1 )
239 CALL dcopy( bsiz2, q( qptr( curr+1 ) ), bsiz2, z( mid ), 1 )
240 DO 20 k = mid + bsiz2, n
249 DO 70 k = 1, curlvl - 1
250 curr = ptr + curpbm*2**( curlvl-k ) + 2**( curlvl-k-1 ) - 1
251 psiz1 = prmptr( curr+1 ) - prmptr( curr )
252 psiz2 = prmptr( curr+2 ) - prmptr( curr+1 )
257 DO 30 i = givptr( curr ), givptr( curr+1 ) - 1
258 CALL drot( 1, z( zptr1+givcol( 1, i )-1 ), 1,
259 $ z( zptr1+givcol( 2, i )-1 ), 1, givnum( 1, i ),
262 DO 40 i = givptr( curr+1 ), givptr( curr+2 ) - 1
263 CALL drot( 1, z( mid-1+givcol( 1, i ) ), 1,
264 $ z( mid-1+givcol( 2, i ) ), 1, givnum( 1, i ),
267 psiz1 = prmptr( curr+1 ) - prmptr( curr )
268 psiz2 = prmptr( curr+2 ) - prmptr( curr+1 )
269 DO 50 i = 0, psiz1 - 1
270 ztemp( i+1 ) = z( zptr1+perm( prmptr( curr )+i )-1 )
272 DO 60 i = 0, psiz2 - 1
273 ztemp( psiz1+i+1 ) = z( mid+perm( prmptr( curr+1 )+i )-1 )
282 bsiz1 = int( half+sqrt( dble( qptr( curr+1 )-qptr( curr ) ) ) )
283 bsiz2 = int( half+sqrt( dble( qptr( curr+2 )-qptr( curr+
285 IF( bsiz1.GT.0 )
THEN
286 CALL dgemv(
'T', bsiz1, bsiz1, one, q( qptr( curr ) ),
287 $ bsiz1, ztemp( 1 ), 1, zero, z( zptr1 ), 1 )
289 CALL dcopy( psiz1-bsiz1, ztemp( bsiz1+1 ), 1, z( zptr1+bsiz1 ),
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 xerbla(srname, info)
subroutine dcopy(n, dx, incx, dy, incy)
DCOPY
subroutine dgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
DGEMV
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...
subroutine drot(n, dx, incx, dy, incy, c, s)
DROT