229 $ D, E, HOUS, LHOUS, WORK, LWORK, INFO )
242 CHARACTER STAGE1, UPLO, VECT
243 INTEGER N, KD, LDAB, LHOUS, LWORK, INFO
247 REAL AB( LDAB, * ), HOUS( * ), WORK( * )
255 parameter( rzero = 0.0e+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 $ sisev, sizetau, ldv, lhmin, lwmin
273 INTRINSIC min, max, ceiling, real
279 EXTERNAL lsame, ilaenv2stage, sroundup_lwork
288 afters1 = lsame( stage1,
'Y' )
289 wantq = lsame( vect,
'V' )
290 upper = lsame( uplo,
'U' )
291 lquery = ( lwork.EQ.-1 ) .OR. ( lhous.EQ.-1 )
295 ib = ilaenv2stage( 2,
'SSYTRD_SB2ST', vect, n, kd, -1, -1 )
296 lhmin = ilaenv2stage( 3,
'SSYTRD_SB2ST', vect, n, kd, ib, -1 )
297 lwmin = ilaenv2stage( 4,
'SSYTRD_SB2ST', vect, n, kd, ib, -1 )
299 IF( .NOT.afters1 .AND. .NOT.lsame( stage1,
'N' ) )
THEN
301 ELSE IF( .NOT.lsame( vect,
'N' ) )
THEN
303 ELSE IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
305 ELSE IF( n.LT.0 )
THEN
307 ELSE IF( kd.LT.0 )
THEN
309 ELSE IF( ldab.LT.(kd+1) )
THEN
311 ELSE IF( lhous.LT.lhmin .AND. .NOT.lquery )
THEN
313 ELSE IF( lwork.LT.lwmin .AND. .NOT.lquery )
THEN
319 work( 1 ) = sroundup_lwork(lwmin)
323 CALL xerbla(
'SSYTRD_SB2ST', -info )
325 ELSE IF( lquery )
THEN
343 indv = indtau + sizetau
360 awpos = inda + kd + 1
376 d( i ) = ( ab( abdpos, i ) )
399 d( i ) = ( ab( abdpos, i ) )
404 e( i ) = ( ab( abofdpos, i+1 ) )
408 e( i ) = ( ab( abofdpos, i ) )
423 nbtiles = ceiling( real(n)/real(kd) )
424 stepercol = ceiling( real(shift)/real(grsiz) )
425 thgrnb = ceiling( real(n-1)/real(thgrsiz) )
427 CALL slacpy(
"A", kd+1, n, ab, ldab, work( apos ), lda )
428 CALL slaset(
"A", kd, n, zero, zero, work( awpos ), lda )
445 DO 100 thgrid = 1, thgrnb
446 stt = (thgrid-1)*thgrsiz+1
447 thed = min( (stt + thgrsiz -1), (n-1))
451 DO 120 m = 1, stepercol
453 DO 130 sweepid = st, ed
455 myid = (i-sweepid)*(stepercol*grsiz)
457 IF ( myid.EQ.1 )
THEN
460 ttype = mod( myid, 2 ) + 2
463 IF( ttype.EQ.2 )
THEN
464 colpt = (myid/2)*kd + sweepid
469 colpt = ((myid+1)/2)*kd + sweepid
472 IF( ( stind.GE.edind-1 ).AND.
473 $ ( edind.EQ.n ) )
THEN
482#if defined(_OPENMP) && _OPENMP >= 201307
483 IF( ttype.NE.1 )
THEN
487 tid = omp_get_thread_num()
489 $ stind, edind, sweepid, n, kd, ib,
491 $ hous( indv ), hous( indtau ), ldv,
492 $ work( indw + tid*kd ) )
497 tid = omp_get_thread_num()
499 $ stind, edind, sweepid, n, kd, ib,
501 $ hous( indv ), hous( indtau ), ldv,
502 $ work( indw + tid*kd ) )
507 $ stind, edind, sweepid, n, kd, ib,
509 $ hous( indv ), hous( indtau ), ldv,
512 IF ( blklastind.GE.(n-1) )
THEN
531 d( i ) = ( work( dpos+(i-1)*lda ) )
539 e( i ) = ( work( ofdpos+i*lda ) )
543 e( i ) = ( work( ofdpos+(i-1)*lda ) )
548 work( 1 ) = sroundup_lwork(lwmin)
subroutine xerbla(srname, info)
subroutine ssb2st_kernels(uplo, wantz, ttype, st, ed, sweep, n, nb, ib, a, lda, v, tau, ldvt, work)
SSB2ST_KERNELS
subroutine ssytrd_sb2st(stage1, vect, uplo, n, kd, ab, ldab, d, e, hous, lhous, work, lwork, info)
SSYTRD_SB2ST reduces a real symmetric band matrix A to real symmetric tridiagonal form T
subroutine slacpy(uplo, m, n, a, lda, b, ldb)
SLACPY copies all or part of one two-dimensional array to another.
subroutine slaset(uplo, m, n, alpha, beta, a, lda)
SLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.