232 $ D, E, HOUS, LHOUS, WORK, LWORK, INFO )
245 CHARACTER STAGE1, UPLO, VECT
246 INTEGER N, KD, LDAB, LHOUS, LWORK, INFO
250 REAL AB( LDAB, * ), HOUS( * ), WORK( * )
258 parameter( rzero = 0.0e+0,
263 LOGICAL LQUERY, WANTQ, UPPER, AFTERS1
264 INTEGER I, M, K, IB, SWEEPID, MYID, SHIFT, STT, ST,
265 $ ed, stind, edind, blklastind, colpt, thed,
266 $ stepercol, grsiz, thgrsiz, thgrnb, thgrid,
267 $ nbtiles, ttype, tid, nthreads,
268 $ abdpos, abofdpos, dpos, ofdpos, awpos,
269 $ inda, indw, apos, sizea, lda, indv, indtau,
270 $ sisev, sizetau, ldv, lhmin, lwmin
277 INTRINSIC min, max, ceiling, real
283 EXTERNAL lsame, ilaenv2stage, sroundup_lwork
291 afters1 = lsame( stage1,
'Y' )
292 wantq = lsame( vect,
'V' )
293 upper = lsame( uplo,
'U' )
294 lquery = ( lwork.EQ.-1 ) .OR. ( lhous.EQ.-1 )
298 ib = ilaenv2stage( 2,
'SSYTRD_SB2ST', vect, n, kd,
300 IF( n.EQ.0 .OR. kd.LE.1 )
THEN
304 lhmin = ilaenv2stage( 3,
'SSYTRD_SB2ST', vect, n, kd, ib,
306 lwmin = ilaenv2stage( 4,
'SSYTRD_SB2ST', vect, n, kd, ib,
310 IF( .NOT.afters1 .AND. .NOT.lsame( stage1,
'N' ) )
THEN
312 ELSE IF( .NOT.lsame( vect,
'N' ) )
THEN
314 ELSE IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
316 ELSE IF( n.LT.0 )
THEN
318 ELSE IF( kd.LT.0 )
THEN
320 ELSE IF( ldab.LT.(kd+1) )
THEN
322 ELSE IF( lhous.LT.lhmin .AND. .NOT.lquery )
THEN
324 ELSE IF( lwork.LT.lwmin .AND. .NOT.lquery )
THEN
329 hous( 1 ) = sroundup_lwork( lhmin )
330 work( 1 ) = sroundup_lwork( lwmin )
334 CALL xerbla(
'SSYTRD_SB2ST', -info )
336 ELSE IF( lquery )
THEN
354 indv = indtau + sizetau
371 awpos = inda + kd + 1
387 d( i ) = ( ab( abdpos, i ) )
410 d( i ) = ( ab( abdpos, i ) )
415 e( i ) = ( ab( abofdpos, i+1 ) )
419 e( i ) = ( ab( abofdpos, i ) )
434 nbtiles = ceiling( real(n)/real(kd) )
435 stepercol = ceiling( real(shift)/real(grsiz) )
436 thgrnb = ceiling( real(n-1)/real(thgrsiz) )
438 CALL slacpy(
"A", kd+1, n, ab, ldab, work( apos ), lda )
439 CALL slaset(
"A", kd, n, zero, zero, work( awpos ), lda )
456 DO 100 thgrid = 1, thgrnb
457 stt = (thgrid-1)*thgrsiz+1
458 thed = min( (stt + thgrsiz -1), (n-1))
462 DO 120 m = 1, stepercol
464 DO 130 sweepid = st, ed
466 myid = (i-sweepid)*(stepercol*grsiz)
468 IF ( myid.EQ.1 )
THEN
471 ttype = mod( myid, 2 ) + 2
474 IF( ttype.EQ.2 )
THEN
475 colpt = (myid/2)*kd + sweepid
480 colpt = ((myid+1)/2)*kd + sweepid
483 IF( ( stind.GE.edind-1 ).AND.
484 $ ( edind.EQ.n ) )
THEN
493#if defined(_OPENMP) && _OPENMP >= 201307
494 IF( ttype.NE.1 )
THEN
498 tid = omp_get_thread_num()
500 $ uplo, wantq, ttype,
501 $ stind, edind, sweepid, n, kd, ib,
503 $ hous( indv ), hous( indtau ), ldv,
504 $ work( indw + tid*kd ) )
509 tid = omp_get_thread_num()
511 $ uplo, wantq, ttype,
512 $ stind, edind, sweepid, n, kd, ib,
514 $ hous( indv ), hous( indtau ), ldv,
515 $ work( indw + tid*kd ) )
520 $ uplo, wantq, ttype,
521 $ stind, edind, sweepid, n, kd, ib,
523 $ hous( indv ), hous( indtau ), ldv,
526 IF ( blklastind.GE.(n-1) )
THEN
545 d( i ) = ( work( dpos+(i-1)*lda ) )
553 e( i ) = ( work( ofdpos+i*lda ) )
557 e( i ) = ( work( ofdpos+(i-1)*lda ) )
561 work( 1 ) = sroundup_lwork( lwmin )