170 SUBROUTINE dlaed0( ICOMPQ, QSIZ, N, D, E, Q, LDQ, QSTORE, LDQS,
171 $ WORK, IWORK, INFO )
178 INTEGER ICOMPQ, INFO, LDQ, LDQS, N, QSIZ
182 DOUBLE PRECISION D( * ), E( * ), Q( LDQ, * ), QSTORE( LDQS, * ),
189 DOUBLE PRECISION ZERO, ONE, TWO
190 parameter( zero = 0.d0, one = 1.d0, two = 2.d0 )
193 INTEGER CURLVL, CURPRB, CURR, I, IGIVCL, IGIVNM,
194 $ igivpt, indxq, iperm, iprmpt, iq, iqptr, iwrem,
195 $ j, k, lgn, matsiz, msd2, smlsiz, smm1, spm1,
196 $ spm2, submat, subpbs, tlvls
197 DOUBLE PRECISION TEMP
208 INTRINSIC abs, dble, int, log, max
216 IF( icompq.LT.0 .OR. icompq.GT.2 )
THEN
218 ELSE IF( ( icompq.EQ.1 ) .AND. ( qsiz.LT.max( 0, n ) ) )
THEN
220 ELSE IF( n.LT.0 )
THEN
222 ELSE IF( ldq.LT.max( 1, n ) )
THEN
224 ELSE IF( ldqs.LT.max( 1, n ) )
THEN
228 CALL xerbla(
'DLAED0', -info )
237 smlsiz = ilaenv( 9,
'DLAED0',
' ', 0, 0, 0, 0 )
246 IF( iwork( subpbs ).GT.smlsiz )
THEN
247 DO 20 j = subpbs, 1, -1
248 iwork( 2*j ) = ( iwork( j )+1 ) / 2
249 iwork( 2*j-1 ) = iwork( j ) / 2
256 iwork( j ) = iwork( j ) + iwork( j-1 )
264 submat = iwork( i ) + 1
266 d( smm1 ) = d( smm1 ) - abs( e( smm1 ) )
267 d( submat ) = d( submat ) - abs( e( smm1 ) )
271 IF( icompq.NE.2 )
THEN
276 temp = log( dble( n ) ) / log( two )
282 iprmpt = indxq + n + 1
283 iperm = iprmpt + n*lgn
284 iqptr = iperm + n*lgn
285 igivpt = iqptr + n + 2
286 igivcl = igivpt + n*lgn
289 iq = igivnm + 2*n*lgn
290 iwrem = iq + n**2 + 1
295 iwork( iprmpt+i ) = 1
296 iwork( igivpt+i ) = 1
310 submat = iwork( i ) + 1
311 matsiz = iwork( i+1 ) - iwork( i )
313 IF( icompq.EQ.2 )
THEN
314 CALL dsteqr(
'I', matsiz, d( submat ), e( submat ),
315 $ q( submat, submat ), ldq, work, info )
319 CALL dsteqr(
'I', matsiz, d( submat ), e( submat ),
320 $ work( iq-1+iwork( iqptr+curr ) ), matsiz, work,
324 IF( icompq.EQ.1 )
THEN
325 CALL dgemm(
'N',
'N', qsiz, matsiz, matsiz, one,
326 $ q( 1, submat ), ldq, work( iq-1+iwork( iqptr+
327 $ curr ) ), matsiz, zero, qstore( 1, submat ),
330 iwork( iqptr+curr+1 ) = iwork( iqptr+curr ) + matsiz**2
334 DO 60 j = submat, iwork( i+1 )
347 IF( subpbs.GT.1 )
THEN
356 submat = iwork( i ) + 1
357 matsiz = iwork( i+2 ) - iwork( i )
370 IF( icompq.EQ.2 )
THEN
371 CALL dlaed1( matsiz, d( submat ), q( submat, submat ),
372 $ ldq, iwork( indxq+submat ),
373 $ e( submat+msd2-1 ), msd2, work,
374 $ iwork( subpbs+1 ), info )
376 CALL dlaed7( icompq, matsiz, qsiz, tlvls, curlvl, curprb,
377 $ d( submat ), qstore( 1, submat ), ldqs,
378 $ iwork( indxq+submat ), e( submat+msd2-1 ),
379 $ msd2, work( iq ), iwork( iqptr ),
380 $ iwork( iprmpt ), iwork( iperm ),
381 $ iwork( igivpt ), iwork( igivcl ),
382 $ work( igivnm ), work( iwrem ),
383 $ iwork( subpbs+1 ), info )
387 iwork( i / 2+1 ) = iwork( i+2 )
399 IF( icompq.EQ.1 )
THEN
403 CALL dcopy( qsiz, qstore( 1, j ), 1, q( 1, i ), 1 )
405 CALL dcopy( n, work, 1, d, 1 )
406 ELSE IF( icompq.EQ.2 )
THEN
410 CALL dcopy( n, q( 1, j ), 1, work( n*i+1 ), 1 )
412 CALL dcopy( n, work, 1, d, 1 )
413 CALL dlacpy(
'A', n, n, work( n+1 ), n, q, ldq )
419 CALL dcopy( n, work, 1, d, 1 )
424 info = submat*( n+1 ) + submat + matsiz - 1
subroutine xerbla(srname, info)
subroutine dcopy(n, dx, incx, dy, incy)
DCOPY
subroutine dgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
DGEMM
subroutine dlacpy(uplo, m, n, a, lda, b, ldb)
DLACPY copies all or part of one two-dimensional array to another.
subroutine dlaed0(icompq, qsiz, n, d, e, q, ldq, qstore, ldqs, work, iwork, info)
DLAED0 used by DSTEDC. Computes all eigenvalues and corresponding eigenvectors of an unreduced symmet...
subroutine dlaed1(n, d, q, ldq, indxq, rho, cutpnt, work, iwork, info)
DLAED1 used by DSTEDC. Computes the updated eigensystem of a diagonal matrix after modification by a ...
subroutine dlaed7(icompq, n, qsiz, tlvls, curlvl, curpbm, d, q, ldq, indxq, rho, cutpnt, qstore, qptr, prmptr, perm, givptr, givcol, givnum, work, iwork, info)
DLAED7 used by DSTEDC. Computes the updated eigensystem of a diagonal matrix after modification by a ...
subroutine dsteqr(compz, n, d, e, z, ldz, work, info)
DSTEQR