170 SUBROUTINE slaed0( ICOMPQ, QSIZ, N, D, E, Q, LDQ, QSTORE, LDQS,
171 $ WORK, IWORK, INFO )
178 INTEGER ICOMPQ, INFO, LDQ, LDQS, N, QSIZ
182 REAL D( * ), E( * ), Q( ldq, * ), QSTORE( ldqs, * ),
190 parameter( zero = 0.e0, one = 1.e0, two = 2.e0 )
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
208 INTRINSIC abs, int, log, max, real
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(
'SLAED0', -info )
237 smlsiz = ilaenv( 9,
'SLAED0',
' ', 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(
REAL( 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 ssteqr(
'I', matsiz, d( submat ), e( submat ),
315 $ q( submat, submat ), ldq, work, info )
319 CALL ssteqr(
'I', matsiz, d( submat ), e( submat ),
320 $ work( iq-1+iwork( iqptr+curr ) ), matsiz, work,
324 IF( icompq.EQ.1 )
THEN 325 CALL sgemm(
'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 slaed1( 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 slaed7( 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 scopy( qsiz, qstore( 1, j ), 1, q( 1, i ), 1 )
405 CALL scopy( n, work, 1, d, 1 )
406 ELSE IF( icompq.EQ.2 )
THEN 410 CALL scopy( n, q( 1, j ), 1, work( n*i+1 ), 1 )
412 CALL scopy( n, work, 1, d, 1 )
413 CALL slacpy(
'A', n, n, work( n+1 ), n, q, ldq )
419 CALL scopy( n, work, 1, d, 1 )
424 info = submat*( n+1 ) + submat + matsiz - 1
subroutine ssteqr(COMPZ, N, D, E, Z, LDZ, WORK, INFO)
SSTEQR
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine slaed1(N, D, Q, LDQ, INDXQ, RHO, CUTPNT, WORK, IWORK, INFO)
SLAED1 used by SSTEDC. Computes the updated eigensystem of a diagonal matrix after modification by a ...
subroutine sgemm(TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
SGEMM
subroutine slaed7(ICOMPQ, N, QSIZ, TLVLS, CURLVL, CURPBM, D, Q, LDQ, INDXQ, RHO, CUTPNT, QSTORE, QPTR, PRMPTR, PERM, GIVPTR, GIVCOL, GIVNUM, WORK, IWORK, INFO)
SLAED7 used by SSTEDC. Computes the updated eigensystem of a diagonal matrix after modification by a ...
subroutine scopy(N, SX, INCX, SY, INCY)
SCOPY
subroutine slaed0(ICOMPQ, QSIZ, N, D, E, Q, LDQ, QSTORE, LDQS, WORK, IWORK, INFO)
SLAED0 used by SSTEDC. Computes all eigenvalues and corresponding eigenvectors of an unreduced symmet...
subroutine slacpy(UPLO, M, N, A, LDA, B, LDB)
SLACPY copies all or part of one two-dimensional array to another.