35 #ifndef TEMPLATE_LAPACK_GGEV_HEADER
36 #define TEMPLATE_LAPACK_GGEV_HEADER
41 a,
const integer *lda, Treal *b,
const integer *ldb, Treal *alphar,
42 Treal *alphai, Treal *beta, Treal *vl,
const integer *ldvl,
187 integer a_dim1, a_offset, b_dim1, b_offset, vl_dim1, vl_offset, vr_dim1,
188 vr_offset, i__1, i__2;
189 Treal d__1, d__2, d__3, d__4;
204 integer ijobvl, iright, ijobvr;
205 Treal anrmto, bnrmto;
212 #define a_ref(a_1,a_2) a[(a_2)*a_dim1 + a_1]
213 #define b_ref(a_1,a_2) b[(a_2)*b_dim1 + a_1]
214 #define vl_ref(a_1,a_2) vl[(a_2)*vl_dim1 + a_1]
215 #define vr_ref(a_1,a_2) vr[(a_2)*vr_dim1 + a_1]
219 a_offset = 1 + a_dim1 * 1;
222 b_offset = 1 + b_dim1 * 1;
228 vl_offset = 1 + vl_dim1 * 1;
231 vr_offset = 1 + vr_dim1 * 1;
264 lquery = *lwork == -1;
267 }
else if (ijobvr <= 0) {
275 }
else if (*ldvl < 1 || ( ilvl && *ldvl < *n ) ) {
277 }
else if (*ldvr < 1 || ( ilvr && *ldvr < *n ) ) {
290 if (*info == 0 && (*lwork >= 1 || lquery)) {
294 i__1 = 1, i__2 = *n << 3;
296 work[1] = (Treal) maxwrk;
299 if (*lwork < minwrk && ! lquery) {
321 bignum = 1. / smlnum;
324 bignum = 1. / smlnum;
330 if (anrm > 0. && anrm < smlnum) {
333 }
else if (anrm > bignum) {
346 if (bnrm > 0. && bnrm < smlnum) {
349 }
else if (bnrm > bignum) {
365 ileft], &work[iright], &work[iwrk], &ierr);
370 irows = ihi + 1 - ilo;
372 icols = *n + 1 - ilo;
378 i__1 = *lwork + 1 - iwrk;
385 i__1 = *lwork + 1 - iwrk;
387 char str_L[] = {
'L', 0};
388 char str_T[] = {
'T', 0};
390 itau], &
a_ref(ilo, ilo), lda, &work[iwrk], &i__1, &ierr);
402 i__1 = *lwork + 1 - iwrk;
404 &work[iwrk], &i__1, &ierr);
422 ldb, &vl[vl_offset], ldvl, &vr[vr_offset], ldvr, &ierr);
425 b_ref(ilo, ilo), ldb, &vl[vl_offset], ldvl, &vr[vr_offset],
435 *(
unsigned char *)chtemp =
'S';
437 *(
unsigned char *)chtemp =
'E';
439 i__1 = *lwork + 1 - iwrk;
441 b_offset], ldb, &alphar[1], &alphai[1], &beta[1], &vl[vl_offset],
442 ldvl, &vr[vr_offset], ldvr, &work[iwrk], &i__1, &ierr);
444 if (ierr > 0 && ierr <= *n) {
446 }
else if (ierr > *n && ierr <= *n << 1) {
460 *(
unsigned char *)chtemp =
'B';
462 *(
unsigned char *)chtemp =
'L';
465 *(
unsigned char *)chtemp =
'R';
468 &vl[vl_offset], ldvl, &vr[vr_offset], ldvr, n, &in, &work[
480 vl[vl_offset], ldvl, &ierr);
482 for (jc = 1; jc <= i__1; ++jc) {
483 if (alphai[jc] < 0.) {
487 if (alphai[jc] == 0.) {
489 for (jr = 1; jr <= i__2; ++jr) {
498 for (jr = 1; jr <= i__2; ++jr) {
510 if (alphai[jc] == 0.) {
512 for (jr = 1; jr <= i__2; ++jr) {
518 for (jr = 1; jr <= i__2; ++jr) {
530 vr[vr_offset], ldvr, &ierr);
532 for (jc = 1; jc <= i__1; ++jc) {
533 if (alphai[jc] < 0.) {
537 if (alphai[jc] == 0.) {
539 for (jr = 1; jr <= i__2; ++jr) {
548 for (jr = 1; jr <= i__2; ++jr) {
560 if (alphai[jc] == 0.) {
562 for (jr = 1; jr <= i__2; ++jr) {
568 for (jr = 1; jr <= i__2; ++jr) {
599 work[1] = (Treal) maxwrk;
Treal template_lapack_lange(const char *norm, const integer *m, const integer *n, const Treal *a, const integer *lda, Treal *work)
Definition: template_lapack_lange.h:40
#define absMACRO(x)
Definition: template_blas_common.h:45
int template_lapack_lascl(const char *type__, const integer *kl, const integer *ku, const Treal *cfrom, const Treal *cto, const integer *m, const integer *n, Treal *a, const integer *lda, integer *info)
Definition: template_lapack_lascl.h:40
int template_lapack_orgqr(const integer *m, const integer *n, const integer *k, Treal *a, const integer *lda, const Treal *tau, Treal *work, const integer *lwork, integer *info)
Definition: template_lapack_orgqr.h:41
int template_lapack_laset(const char *uplo, const integer *m, const integer *n, const Treal *alpha, const Treal *beta, Treal *a, const integer *lda)
Definition: template_lapack_laset.h:40
int template_lapack_lacpy(const char *uplo, const integer *m, const integer *n, const Treal *a, const integer *lda, Treal *b, const integer *ldb)
Definition: template_lapack_lacpy.h:40
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
int template_lapack_labad(Treal *small, Treal *large)
Definition: template_lapack_labad.h:40
int template_lapack_geqrf(const integer *m, const integer *n, Treal *a, const integer *lda, Treal *tau, Treal *work, const integer *lwork, integer *info)
Definition: template_lapack_geqrf.h:40
int template_lapack_gghrd(const char *compq, const char *compz, const integer *n, const integer *ilo, const integer *ihi, Treal *a, const integer *lda, Treal *b, const integer *ldb, Treal *q, const integer *ldq, Treal *z__, const integer *ldz, integer *info)
Definition: template_lapack_gghrd.h:40
int template_blas_erbla(const char *srname, integer *info)
Definition: template_blas_common.cc:144
int template_lapack_ormqr(char *side, char *trans, const integer *m, const integer *n, const integer *k, Treal *a, const integer *lda, const Treal *tau, Treal *c__, const integer *ldc, Treal *work, const integer *lwork, integer *info)
Definition: template_lapack_ormqr.h:40
int template_lapack_hgeqz(const char *job, const char *compq, const char *compz, const integer *n, const integer *ilo, const integer *ihi, Treal *a, const integer *lda, Treal *b, const integer *ldb, Treal *alphar, Treal *alphai, Treal *beta, Treal *q, const integer *ldq, Treal *z__, const integer *ldz, Treal *work, const integer *lwork, integer *info)
Definition: template_lapack_hgeqz.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
#define FALSE_
Definition: template_lapack_common.h:41
int ftnlen
Definition: template_blas_common.h:40
int template_lapack_ggbal(const char *job, const integer *n, Treal *a, const integer *lda, Treal *b, const integer *ldb, integer *ilo, integer *ihi, Treal *lscale, Treal *rscale, Treal *work, integer *info)
Definition: template_lapack_ggbal.h:40
int template_lapack_ggbak(const char *job, const char *side, const integer *n, const integer *ilo, const integer *ihi, const Treal *lscale, const Treal *rscale, const integer *m, Treal *v, const integer *ldv, integer *info)
Definition: template_lapack_ggbak.h:40
int template_lapack_ggev(const char *jobvl, const char *jobvr, const integer *n, Treal *a, const integer *lda, Treal *b, const integer *ldb, Treal *alphar, Treal *alphai, Treal *beta, Treal *vl, const integer *ldvl, Treal *vr, const integer *ldvr, Treal *work, const integer *lwork, integer *info)
Definition: template_lapack_ggev.h:40
Treal template_blas_sqrt(Treal x)
logical template_blas_lsame(const char *ca, const char *cb)
Definition: template_blas_common.cc:44
int template_lapack_tgevc(const char *side, const char *howmny, const logical *select, const integer *n, const Treal *a, const integer *lda, const Treal *b, const integer *ldb, Treal *vl, const integer *ldvl, Treal *vr, const integer *ldvr, const integer *mm, integer *m, Treal *work, integer *info)
Definition: template_lapack_tgevc.h:44