35 #ifndef TEMPLATE_LAPACK_STEVR_HEADER 36 #define TEMPLATE_LAPACK_STEVR_HEADER 40 Treal * d__, Treal *e,
const Treal *vl,
41 const Treal *vu,
const integer *il,
42 const integer *iu,
const Treal *abstol,
50 integer z_dim1, z_offset, i__1, i__2;
57 Treal eps, vll, vuu, tmp1;
68 integer iscale, ieeeok, indibl, indifl;
303 z_offset = 1 + z_dim1;
317 lquery = *lwork == -1 || *liwork == -1;
319 i__1 = 1, i__2 = *n * 20;
322 i__1 = 1, i__2 = *n * 10;
329 }
else if (! (alleig || valeig || indeig)) {
335 if (*n > 0 && *vu <= *vl) {
339 if (*il < 1 || *il >
maxMACRO(1,*n)) {
341 }
else if (*iu <
minMACRO(*n,*il) || *iu > *n) {
347 if (*ldz < 1 || ( wantz && *ldz < *n ) ) {
353 work[1] = (Treal) lwmin;
356 if (*lwork < lwmin && ! lquery) {
358 }
else if (*liwork < liwmin && ! lquery) {
379 if (alleig || indeig) {
383 if (*vl < d__[1] && *vu >= d__[1]) {
389 z__[z_dim1 + 1] = 1.;
398 smlnum = safmin / eps;
399 bignum = 1. / smlnum;
413 if (tnrm > 0. && tnrm < rmin) {
416 }
else if (tnrm > rmax) {
436 indisp = indibl + *n;
441 indifl = indisp + *n;
443 indiwo = indisp + *n;
452 if (*il == 1 && *iu == *n) {
456 if ((alleig || test) && ieeeok == 1) {
464 if (*abstol <= *n * 2. * eps) {
469 i__1 = *lwork - (*n << 1);
470 template_lapack_stemr(jobz,
"A", n, &work[*n + 1], &work[1], vl, vu, il, iu, m,
471 &w[1], &z__[z_offset], ldz, n, &isuppz[1], &tryrac, &work[
472 (*n << 1) + 1], &i__1, &iwork[1], liwork, info);
485 *(
unsigned char *)order =
'B';
487 *(
unsigned char *)order =
'E';
489 template_lapack_stebz(range, order, n, &vll, &vuu, il, iu, abstol, &d__[1], &e[1], m, &
490 nsplit, &w[1], &iwork[indibl], &iwork[indisp], &work[1], &iwork[
495 z__[z_offset], ldz, &work[1], &iwork[indiwo], &iwork[indifl],
517 for (j = 1; j <= i__1; ++j) {
521 for (jj = j + 1; jj <= i__2; ++jj) {
532 iwork[i__] = iwork[j];
546 work[1] = (Treal) lwmin;
int template_blas_scal(const integer *n, const Treal *da, Treal *dx, const integer *incx)
Definition: template_blas_scal.h:41
int integer
Definition: template_blas_common.h:38
integer template_lapack_ilaenv(const integer *ispec, const char *name__, const char *opts, const integer *n1, const integer *n2, const integer *n3, const integer *n4, ftnlen name_len, ftnlen opts_len)
Definition: template_lapack_common.cc:279
#define maxMACRO(a, b)
Definition: template_blas_common.h:43
#define minMACRO(a, b)
Definition: template_blas_common.h:44
int template_lapack_stebz(const char *range, const char *order, const integer *n, const Treal *vl, const Treal *vu, const integer *il, const integer *iu, const Treal *abstol, const Treal *d__, const Treal *e, integer *m, integer *nsplit, Treal *w, integer *iblock, integer *isplit, Treal *work, integer *iwork, integer *info)
Definition: template_lapack_stebz.h:40
int template_blas_erbla(const char *srname, integer *info)
Definition: template_blas_common.cc:144
int template_blas_swap(const integer *n, Treal *dx, const integer *incx, Treal *dy, const integer *incy)
Definition: template_blas_swap.h:40
int template_lapack_stein(const integer *n, const Treal *d__, const Treal *e, const integer *m, const Treal *w, const integer *iblock, const integer *isplit, Treal *z__, const integer *ldz, Treal *work, integer *iwork, integer *ifail, integer *info)
Definition: template_lapack_stein.h:40
Treal template_lapack_lamch(const char *cmach, Treal dummyReal)
Definition: template_lapack_lamch.h:199
bool logical
Definition: template_blas_common.h:39
#define TRUE_
Definition: template_lapack_common.h:40
int template_blas_copy(const integer *n, const Treal *dx, const integer *incx, Treal *dy, const integer *incy)
Definition: template_blas_copy.h:40
#define FALSE_
Definition: template_lapack_common.h:41
int ftnlen
Definition: template_blas_common.h:40
int template_lapack_sterf(const integer *n, Treal *d__, Treal *e, integer *info)
Definition: template_lapack_sterf.h:41
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:39
int template_lapack_stevr(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, const Treal *abstol, integer *m, Treal *w, Treal *z__, const integer *ldz, integer *isuppz, Treal *work, integer *lwork, integer *iwork, integer *liwork, integer *info)
Definition: template_lapack_stevr.h:39
Treal template_lapack_lanst(const char *norm, const integer *n, const Treal *d__, const Treal *e)
Definition: template_lapack_lanst.h:40
Treal template_blas_sqrt(Treal x)
logical template_blas_lsame(const char *ca, const char *cb)
Definition: template_blas_common.cc:44