229 $ D, E, HOUS, LHOUS, WORK, LWORK, INFO )
242 CHARACTER STAGE1, UPLO, VECT
243 INTEGER N, KD, LDAB, LHOUS, LWORK, INFO
246 DOUBLE PRECISION D( * ), E( * )
247 DOUBLE PRECISION AB( LDAB, * ), HOUS( * ), WORK( * )
253 DOUBLE PRECISION RZERO
254 DOUBLE PRECISION ZERO, ONE
255 parameter( rzero = 0.0d+0,
260 LOGICAL LQUERY, WANTQ, UPPER, AFTERS1
261 INTEGER I, M, K, IB, SWEEPID, MYID, SHIFT, STT, ST,
262 $ ed, stind, edind, blklastind, colpt, thed,
263 $ stepercol, grsiz, thgrsiz, thgrnb, thgrid,
264 $ nbtiles, ttype, tid, nthreads, debug,
265 $ abdpos, abofdpos, dpos, ofdpos, awpos,
266 $ inda, indw, apos, sizea, lda, indv, indtau,
267 $ sidev, sizetau, ldv, lhmin, lwmin
273 INTRINSIC min, max, ceiling, real
278 EXTERNAL lsame, ilaenv2stage
287 afters1 = lsame( stage1,
'Y' )
288 wantq = lsame( vect,
'V' )
289 upper = lsame( uplo,
'U' )
290 lquery = ( lwork.EQ.-1 ) .OR. ( lhous.EQ.-1 )
294 ib = ilaenv2stage( 2,
'DSYTRD_SB2ST', vect, n, kd, -1, -1 )
295 lhmin = ilaenv2stage( 3,
'DSYTRD_SB2ST', vect, n, kd, ib, -1 )
296 lwmin = ilaenv2stage( 4,
'DSYTRD_SB2ST', vect, n, kd, ib, -1 )
298 IF( .NOT.afters1 .AND. .NOT.lsame( stage1,
'N' ) )
THEN
300 ELSE IF( .NOT.lsame( vect,
'N' ) )
THEN
302 ELSE IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
304 ELSE IF( n.LT.0 )
THEN
306 ELSE IF( kd.LT.0 )
THEN
308 ELSE IF( ldab.LT.(kd+1) )
THEN
310 ELSE IF( lhous.LT.lhmin .AND. .NOT.lquery )
THEN
312 ELSE IF( lwork.LT.lwmin .AND. .NOT.lquery )
THEN
322 CALL xerbla(
'DSYTRD_SB2ST', -info )
324 ELSE IF( lquery )
THEN
342 indv = indtau + sizetau
359 awpos = inda + kd + 1
375 d( i ) = ( ab( abdpos, i ) )
398 d( i ) = ( ab( abdpos, i ) )
403 e( i ) = ( ab( abofdpos, i+1 ) )
407 e( i ) = ( ab( abofdpos, i ) )
422 nbtiles = ceiling( real(n)/real(kd) )
423 stepercol = ceiling( real(shift)/real(grsiz) )
424 thgrnb = ceiling( real(n-1)/real(thgrsiz) )
426 CALL dlacpy(
"A", kd+1, n, ab, ldab, work( apos ), lda )
427 CALL dlaset(
"A", kd, n, zero, zero, work( awpos ), lda )
444 DO 100 thgrid = 1, thgrnb
445 stt = (thgrid-1)*thgrsiz+1
446 thed = min( (stt + thgrsiz -1), (n-1))
450 DO 120 m = 1, stepercol
452 DO 130 sweepid = st, ed
454 myid = (i-sweepid)*(stepercol*grsiz)
456 IF ( myid.EQ.1 )
THEN
459 ttype = mod( myid, 2 ) + 2
462 IF( ttype.EQ.2 )
THEN
463 colpt = (myid/2)*kd + sweepid
468 colpt = ((myid+1)/2)*kd + sweepid
471 IF( ( stind.GE.edind-1 ).AND.
472 $ ( edind.EQ.n ) )
THEN
481#if defined(_OPENMP) && _OPENMP >= 201307
482 IF( ttype.NE.1 )
THEN
486 tid = omp_get_thread_num()
488 $ stind, edind, sweepid, n, kd, ib,
490 $ hous( indv ), hous( indtau ), ldv,
491 $ work( indw + tid*kd ) )
496 tid = omp_get_thread_num()
498 $ stind, edind, sweepid, n, kd, ib,
500 $ hous( indv ), hous( indtau ), ldv,
501 $ work( indw + tid*kd ) )
506 $ stind, edind, sweepid, n, kd, ib,
508 $ hous( indv ), hous( indtau ), ldv,
511 IF ( blklastind.GE.(n-1) )
THEN
530 d( i ) = ( work( dpos+(i-1)*lda ) )
538 e( i ) = ( work( ofdpos+i*lda ) )
542 e( i ) = ( work( ofdpos+(i-1)*lda ) )
subroutine xerbla(srname, info)
subroutine dsb2st_kernels(uplo, wantz, ttype, st, ed, sweep, n, nb, ib, a, lda, v, tau, ldvt, work)
DSB2ST_KERNELS
subroutine dsytrd_sb2st(stage1, vect, uplo, n, kd, ab, ldab, d, e, hous, lhous, work, lwork, info)
DSYTRD_SB2ST reduces a real symmetric band matrix A to real symmetric tridiagonal form T
subroutine dlacpy(uplo, m, n, a, lda, b, ldb)
DLACPY copies all or part of one two-dimensional array to another.
subroutine dlaset(uplo, m, n, alpha, beta, a, lda)
DLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.