164 SUBROUTINE slaeda( 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 REAL GIVNUM( 2, * ), Q( * ), Z( * ), ZTEMP( * )
184 parameter( zero = 0.0e0, half = 0.5e0, one = 1.0e0 )
187 INTEGER BSIZ1, BSIZ2, CURR, I, K, MID, PSIZ1, PSIZ2,
194 INTRINSIC int, real, sqrt
206 CALL xerbla(
'SLAEDA', -info )
226 curr = ptr + curpbm*2**curlvl + 2**( curlvl-1 ) - 1
232 bsiz1 = int( half+sqrt( real( qptr( curr+1 )-qptr( curr ) ) ) )
233 bsiz2 = int( half+sqrt( real( qptr( curr+2 )-qptr( curr+1 ) ) ) )
234 DO 10 k = 1, mid - bsiz1 - 1
237 CALL scopy( bsiz1, q( qptr( curr )+bsiz1-1 ), bsiz1,
238 $ z( mid-bsiz1 ), 1 )
239 CALL scopy( 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 srot( 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 srot( 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( real( qptr( curr+1 )-qptr( curr ) ) ) )
283 bsiz2 = int( half+sqrt( real( qptr( curr+2 )-qptr( curr+
285 IF( bsiz1.GT.0 )
THEN
286 CALL sgemv(
'T', bsiz1, bsiz1, one, q( qptr( curr ) ),
287 $ bsiz1, ztemp( 1 ), 1, zero, z( zptr1 ), 1 )
289 CALL scopy( psiz1-bsiz1, ztemp( bsiz1+1 ), 1, z( zptr1+bsiz1 ),
291 IF( bsiz2.GT.0 )
THEN
292 CALL sgemv(
'T', bsiz2, bsiz2, one, q( qptr( curr+1 ) ),
293 $ bsiz2, ztemp( psiz1+1 ), 1, zero, z( mid ), 1 )
295 CALL scopy( psiz2-bsiz2, ztemp( psiz1+bsiz2+1 ), 1,
296 $ z( mid+bsiz2 ), 1 )
298 ptr = ptr + 2**( tlvls-k )
subroutine xerbla(srname, info)
subroutine scopy(n, sx, incx, sy, incy)
SCOPY
subroutine sgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
SGEMV
subroutine slaeda(n, tlvls, curlvl, curpbm, prmptr, perm, givptr, givcol, givnum, q, qptr, z, ztemp, info)
SLAEDA used by SSTEDC. Computes the Z vector determining the rank-one modification of the diagonal ma...
subroutine srot(n, sx, incx, sy, incy, c, s)
SROT