37 #ifndef TEMPLATE_LAPACK_STEMR_HEADER 38 #define TEMPLATE_LAPACK_STEMR_HEADER 42 d__, Treal *e,
const Treal *vl,
const Treal *vu,
const integer *il,
48 integer z_dim1, z_offset, i__1, i__2;
81 integer inderr, iindwk, indgrs, offset;
83 integer iinspl, ifirst, indwrk, liwmin, nzcmin;
317 z_offset = 1 + z_dim1;
329 lquery = *lwork == -1 || *liwork == -1;
361 }
else if (! (alleig || valeig || indeig)) {
365 }
else if (valeig && *n > 0 && wu <= wl) {
367 }
else if (indeig && (iil < 1 || iil > *n)) {
369 }
else if (indeig && (iiu < iil || iiu > *n)) {
371 }
else if (*ldz < 1 || ( wantz && *ldz < *n ) ) {
373 }
else if (*lwork < lwmin && ! lquery) {
375 }
else if (*liwork < liwmin && ! lquery) {
383 smlnum = safmin / eps;
384 bignum = 1. / smlnum;
391 work[1] = (Treal) lwmin;
394 if (wantz && alleig) {
396 }
else if (wantz && valeig) {
399 }
else if (wantz && indeig) {
400 nzcmin = iiu - iil + 1;
405 if (zquery && *info == 0) {
406 z__[z_dim1 + 1] = (Treal) nzcmin;
407 }
else if (*nzc < nzcmin && ! zquery) {
417 }
else if (lquery || zquery) {
429 if (alleig || indeig) {
433 if (wl < d__[1] && wu >= d__[1]) {
438 if (wantz && ! zquery) {
439 z__[z_dim1 + 1] = 1.;
449 }
else if (wantz && ! zquery) {
452 if (alleig || ( valeig && r2 > wl && r2 <= wu ) || ( indeig && iil == 1 ) ) {
455 if (wantz && ! zquery) {
456 z__[*m * z_dim1 + 1] = -sn;
457 z__[*m * z_dim1 + 2] = cs;
461 isuppz[(*m << 1) - 1] = 1;
462 isuppz[(*m << 1) - 1] = 2;
464 isuppz[(*m << 1) - 1] = 1;
465 isuppz[(*m << 1) - 1] = 1;
468 isuppz[(*m << 1) - 1] = 2;
473 if (alleig || ( valeig && r1 > wl && r1 <= wu ) || ( indeig && iiu == 2 ) ) {
476 if (wantz && ! zquery) {
477 z__[*m * z_dim1 + 1] = cs;
478 z__[*m * z_dim1 + 2] = sn;
482 isuppz[(*m << 1) - 1] = 1;
483 isuppz[(*m << 1) - 1] = 2;
485 isuppz[(*m << 1) - 1] = 1;
486 isuppz[(*m << 1) - 1] = 1;
489 isuppz[(*m << 1) - 1] = 2;
498 inderr = (*n << 1) + 1;
500 indd = (*n << 2) + 1;
506 iindw = (*n << 1) + 1;
517 if (tnrm > 0. && tnrm < rmin) {
519 }
else if (tnrm > rmax) {
565 for (j = 1; j <= i__1; ++j) {
568 work[inde2 + j - 1] = d__1 * d__1;
587 rtol1, &rtol2, &thresh, &nsplit, &iwork[iinspl], m, &w[1], &work[
588 inderr], &work[indgp], &iwork[iindbl], &iwork[iindw], &work[
589 indgrs], &pivmin, &work[indwrk], &iwork[iindwk], &iinfo);
603 c__1, m, &c_b18, &rtol1, &rtol2, &w[1], &work[inderr], &work[
604 indgp], &iwork[iindbl], &iwork[iindw], &work[indgrs], &z__[
605 z_offset], ldz, &isuppz[1], &work[indwrk], &iwork[iindwk], &
618 for (j = 1; j <= i__1; ++j) {
619 itmp = iwork[iindbl + j - 1];
620 w[j] += e[iwork[iinspl + itmp - 1]];
630 i__1 = iwork[iindbl + *m - 1];
631 for (jblk = 1; jblk <= i__1; ++jblk) {
632 iend = iwork[iinspl + jblk - 1];
633 in = iend - ibegin + 1;
638 if (iwork[iindbl + wend] == jblk) {
647 offset = iwork[iindw + wbegin - 1] - 1;
648 ifirst = iwork[iindw + wbegin - 1];
649 ilast = iwork[iindw + wend - 1];
652 &ifirst, &ilast, &rtol2, &offset, &w[wbegin], &work[
653 inderr + wbegin - 1], &work[indwrk], &iwork[iindwk], &
654 pivmin, &tnrm, &iinfo);
681 for (j = 1; j <= i__1; ++j) {
685 for (jj = j + 1; jj <= i__2; ++jj) {
698 itmp = isuppz[(i__ << 1) - 1];
699 isuppz[(i__ << 1) - 1] = isuppz[(j << 1) - 1];
700 isuppz[(j << 1) - 1] = itmp;
701 itmp = isuppz[i__ * 2];
702 isuppz[i__ * 2] = isuppz[j * 2];
703 isuppz[j * 2] = itmp;
712 work[1] = (Treal) lwmin;
int template_blas_scal(const integer *n, const Treal *da, Treal *dx, const integer *incx)
Definition: template_blas_scal.h:43
#define absMACRO(x)
Definition: template_blas_common.h:47
int template_lapack_laev2(Treal *a, Treal *b, Treal *c__, Treal *rt1, Treal *rt2, Treal *cs1, Treal *sn1)
Definition: template_lapack_laev2.h:42
int integer
Definition: template_blas_common.h:40
int template_lapack_larre(const char *range, const integer *n, Treal *vl, Treal *vu, integer *il, integer *iu, Treal *d__, Treal *e, Treal *e2, Treal *rtol1, Treal *rtol2, Treal *spltol, integer *nsplit, integer *isplit, integer *m, Treal *w, Treal *werr, Treal *wgap, integer *iblock, integer *indexw, Treal *gers, Treal *pivmin, Treal *work, integer *iwork, integer *info)
Definition: template_lapack_larre.h:46
int template_lapack_larrc(const char *jobt, const integer *n, const Treal *vl, const Treal *vu, Treal *d__, Treal *e, Treal *pivmin, integer *eigcnt, integer *lcnt, integer *rcnt, integer *info)
Definition: template_lapack_larrc.h:41
#define maxMACRO(a, b)
Definition: template_blas_common.h:45
int template_lapack_larrr(const integer *n, Treal *d__, Treal *e, integer *info)
Definition: template_lapack_larrr.h:41
int template_lapack_lasrt(const char *id, const integer *n, Treal *d__, integer *info)
Definition: template_lapack_lasrt.h:42
#define minMACRO(a, b)
Definition: template_blas_common.h:46
int template_lapack_larrv(const integer *n, Treal *vl, Treal *vu, Treal *d__, Treal *l, Treal *pivmin, integer *isplit, integer *m, integer *dol, integer *dou, Treal *minrgp, Treal *rtol1, Treal *rtol2, Treal *w, Treal *werr, Treal *wgap, integer *iblock, integer *indexw, Treal *gers, Treal *z__, const integer *ldz, integer *isuppz, Treal *work, integer *iwork, integer *info)
Definition: template_lapack_larrv.h:45
int template_blas_erbla(const char *srname, integer *info)
Definition: template_blas_common.cc:146
int template_blas_swap(const integer *n, Treal *dx, const integer *incx, Treal *dy, const integer *incy)
Definition: template_blas_swap.h:42
Treal template_lapack_lamch(const char *cmach, Treal dummyReal)
Definition: template_lapack_lamch.h:202
bool logical
Definition: template_blas_common.h:41
int template_blas_copy(const integer *n, const Treal *dx, const integer *incx, Treal *dy, const integer *incy)
Definition: template_blas_copy.h:42
int template_lapack_larrj(integer *n, Treal *d__, Treal *e2, integer *ifirst, integer *ilast, Treal *rtol, integer *offset, Treal *w, Treal *werr, Treal *work, integer *iwork, Treal *pivmin, Treal *spdiam, integer *info)
Definition: template_lapack_larrj.h:41
#define FALSE_
Definition: template_lapack_common.h:43
int template_lapack_stemr(const char *jobz, const char *range, const integer *n, Treal *d__, Treal *e, const Treal *vl, const Treal *vu, const integer *il, const integer *iu, integer *m, Treal *w, Treal *z__, const integer *ldz, const integer *nzc, integer *isuppz, logical *tryrac, Treal *work, integer *lwork, integer *iwork, integer *liwork, integer *info)
Definition: template_lapack_stemr.h:41
int template_lapack_lae2(const Treal *a, const Treal *b, const Treal *c__, Treal *rt1, Treal *rt2)
Definition: template_lapack_lae2.h:42
Treal template_lapack_lanst(const char *norm, const integer *n, const Treal *d__, const Treal *e)
Definition: template_lapack_lanst.h:42
Treal template_blas_sqrt(Treal x)
logical template_blas_lsame(const char *ca, const char *cb)
Definition: template_blas_common.cc:46