229 $ D, E, HOUS, LHOUS, WORK, LWORK, INFO )
243 CHARACTER STAGE1, UPLO, VECT
244 INTEGER N, KD, LDAB, LHOUS, LWORK, INFO
248 COMPLEX AB( LDAB, * ), HOUS( * ), WORK( * )
256 parameter( rzero = 0.0e+0,
257 $ zero = ( 0.0e+0, 0.0e+0 ),
258 $ one = ( 1.0e+0, 0.0e+0 ) )
261 LOGICAL LQUERY, WANTQ, UPPER, AFTERS1
262 INTEGER I, M, K, IB, SWEEPID, MYID, SHIFT, STT, ST,
263 $ ed, stind, edind, blklastind, colpt, thed,
264 $ stepercol, grsiz, thgrsiz, thgrnb, thgrid,
265 $ nbtiles, ttype, tid, nthreads, debug,
266 $ abdpos, abofdpos, dpos, ofdpos, awpos,
267 $ inda, indw, apos, sizea, lda, indv, indtau,
268 $ sicev, sizetau, ldv, lhmin, lwmin
276 INTRINSIC min, max, ceiling, real
282 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,
'CHETRD_HB2ST', vect, n, kd, -1, -1 )
299 lhmin = ilaenv2stage( 3,
'CHETRD_HB2ST', vect, n, kd, ib, -1 )
300 lwmin = ilaenv2stage( 4,
'CHETRD_HB2ST', vect, n, kd, ib, -1 )
302 IF( .NOT.afters1 .AND. .NOT.lsame( stage1,
'N' ) )
THEN
304 ELSE IF( .NOT.lsame( vect,
'N' ) )
THEN
306 ELSE IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
308 ELSE IF( n.LT.0 )
THEN
310 ELSE IF( kd.LT.0 )
THEN
312 ELSE IF( ldab.LT.(kd+1) )
THEN
314 ELSE IF( lhous.LT.lhmin .AND. .NOT.lquery )
THEN
316 ELSE IF( lwork.LT.lwmin .AND. .NOT.lquery )
THEN
322 work( 1 ) = sroundup_lwork(lwmin)
326 CALL xerbla(
'CHETRD_HB2ST', -info )
328 ELSE IF( lquery )
THEN
346 indv = indtau + sizetau
363 awpos = inda + kd + 1
379 d( i ) = real( ab( abdpos, i ) )
402 d( i ) = real( ab( abdpos, i ) )
409 tmp = ab( abofdpos, i+1 )
411 ab( abofdpos, i+1 ) = abstmp
413 IF( abstmp.NE.rzero )
THEN
419 $ ab( abofdpos, i+2 ) = ab( abofdpos, i+2 )*tmp
426 tmp = ab( abofdpos, i )
428 ab( abofdpos, i ) = abstmp
430 IF( abstmp.NE.rzero )
THEN
436 $ ab( abofdpos, i+1 ) = ab( abofdpos, i+1 )*tmp
454 nbtiles = ceiling( real(n)/real(kd) )
455 stepercol = ceiling( real(shift)/real(grsiz) )
456 thgrnb = ceiling( real(n-1)/real(thgrsiz) )
458 CALL clacpy(
"A", kd+1, n, ab, ldab, work( apos ), lda )
459 CALL claset(
"A", kd, n, zero, zero, work( awpos ), lda )
476 DO 100 thgrid = 1, thgrnb
477 stt = (thgrid-1)*thgrsiz+1
478 thed = min( (stt + thgrsiz -1), (n-1))
482 DO 120 m = 1, stepercol
484 DO 130 sweepid = st, ed
486 myid = (i-sweepid)*(stepercol*grsiz)
488 IF ( myid.EQ.1 )
THEN
491 ttype = mod( myid, 2 ) + 2
494 IF( ttype.EQ.2 )
THEN
495 colpt = (myid/2)*kd + sweepid
500 colpt = ((myid+1)/2)*kd + sweepid
503 IF( ( stind.GE.edind-1 ).AND.
504 $ ( edind.EQ.n ) )
THEN
513#if defined(_OPENMP) && _OPENMP >= 201307
514 IF( ttype.NE.1 )
THEN
518 tid = omp_get_thread_num()
520 $ stind, edind, sweepid, n, kd, ib,
522 $ hous( indv ), hous( indtau ), ldv,
523 $ work( indw + tid*kd ) )
528 tid = omp_get_thread_num()
530 $ stind, edind, sweepid, n, kd, ib,
532 $ hous( indv ), hous( indtau ), ldv,
533 $ work( indw + tid*kd ) )
538 $ stind, edind, sweepid, n, kd, ib,
540 $ hous( indv ), hous( indtau ), ldv,
543 IF ( blklastind.GE.(n-1) )
THEN
562 d( i ) = real( work( dpos+(i-1)*lda ) )
570 e( i ) = real( work( ofdpos+i*lda ) )
574 e( i ) = real( work( ofdpos+(i-1)*lda ) )
579 work( 1 ) = sroundup_lwork(lwmin)
subroutine xerbla(srname, info)
subroutine chb2st_kernels(uplo, wantz, ttype, st, ed, sweep, n, nb, ib, a, lda, v, tau, ldvt, work)
CHB2ST_KERNELS
subroutine chetrd_hb2st(stage1, vect, uplo, n, kd, ab, ldab, d, e, hous, lhous, work, lwork, info)
CHETRD_HB2ST reduces a complex Hermitian band matrix A to real symmetric tridiagonal form T
subroutine clacpy(uplo, m, n, a, lda, b, ldb)
CLACPY copies all or part of one two-dimensional array to another.
subroutine claset(uplo, m, n, alpha, beta, a, lda)
CLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.