232 $ D, E, HOUS, LHOUS, WORK, LWORK, INFO )
245 CHARACTER STAGE1, UPLO, VECT
246 INTEGER N, KD, LDAB, LHOUS, LWORK, INFO
249 DOUBLE PRECISION D( * ), E( * )
250 DOUBLE PRECISION AB( LDAB, * ), HOUS( * ), WORK( * )
256 DOUBLE PRECISION RZERO
257 DOUBLE PRECISION ZERO, ONE
258 parameter( rzero = 0.0d+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 $ sidev, sizetau, ldv, lhmin, lwmin
277 INTRINSIC min, max, ceiling, real
282 EXTERNAL lsame, ilaenv2stage
290 afters1 = lsame( stage1,
'Y' )
291 wantq = lsame( vect,
'V' )
292 upper = lsame( uplo,
'U' )
293 lquery = ( lwork.EQ.-1 ) .OR. ( lhous.EQ.-1 )
297 ib = ilaenv2stage( 2,
'DSYTRD_SB2ST', vect, n, kd,
299 IF( n.EQ.0 .OR. kd.LE.1 )
THEN
303 lhmin = ilaenv2stage( 3,
'DSYTRD_SB2ST', vect, n, kd, ib,
305 lwmin = ilaenv2stage( 4,
'DSYTRD_SB2ST', vect, n, kd, ib,
309 IF( .NOT.afters1 .AND. .NOT.lsame( stage1,
'N' ) )
THEN
311 ELSE IF( .NOT.lsame( vect,
'N' ) )
THEN
313 ELSE IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
315 ELSE IF( n.LT.0 )
THEN
317 ELSE IF( kd.LT.0 )
THEN
319 ELSE IF( ldab.LT.(kd+1) )
THEN
321 ELSE IF( lhous.LT.lhmin .AND. .NOT.lquery )
THEN
323 ELSE IF( lwork.LT.lwmin .AND. .NOT.lquery )
THEN
333 CALL xerbla(
'DSYTRD_SB2ST', -info )
335 ELSE IF( lquery )
THEN
353 indv = indtau + sizetau
370 awpos = inda + kd + 1
386 d( i ) = ( ab( abdpos, i ) )
409 d( i ) = ( ab( abdpos, i ) )
414 e( i ) = ( ab( abofdpos, i+1 ) )
418 e( i ) = ( ab( abofdpos, i ) )
433 nbtiles = ceiling( real(n)/real(kd) )
434 stepercol = ceiling( real(shift)/real(grsiz) )
435 thgrnb = ceiling( real(n-1)/real(thgrsiz) )
437 CALL dlacpy(
"A", kd+1, n, ab, ldab, work( apos ), lda )
438 CALL dlaset(
"A", kd, n, zero, zero, work( awpos ), lda )
455 DO 100 thgrid = 1, thgrnb
456 stt = (thgrid-1)*thgrsiz+1
457 thed = min( (stt + thgrsiz -1), (n-1))
461 DO 120 m = 1, stepercol
463 DO 130 sweepid = st, ed
465 myid = (i-sweepid)*(stepercol*grsiz)
467 IF ( myid.EQ.1 )
THEN
470 ttype = mod( myid, 2 ) + 2
473 IF( ttype.EQ.2 )
THEN
474 colpt = (myid/2)*kd + sweepid
479 colpt = ((myid+1)/2)*kd + sweepid
482 IF( ( stind.GE.edind-1 ).AND.
483 $ ( edind.EQ.n ) )
THEN
492#if defined(_OPENMP) && _OPENMP >= 201307
493 IF( ttype.NE.1 )
THEN
497 tid = omp_get_thread_num()
499 $ uplo, wantq, ttype,
500 $ stind, edind, sweepid, n, kd, ib,
502 $ hous( indv ), hous( indtau ), ldv,
503 $ work( indw + tid*kd ) )
508 tid = omp_get_thread_num()
510 $ uplo, wantq, ttype,
511 $ stind, edind, sweepid, n, kd, ib,
513 $ hous( indv ), hous( indtau ), ldv,
514 $ work( indw + tid*kd ) )
519 $ uplo, wantq, ttype,
520 $ stind, edind, sweepid, n, kd, ib,
522 $ hous( indv ), hous( indtau ), ldv,
525 IF ( blklastind.GE.(n-1) )
THEN
544 d( i ) = ( work( dpos+(i-1)*lda ) )
552 e( i ) = ( work( ofdpos+i*lda ) )
556 e( i ) = ( work( ofdpos+(i-1)*lda ) )