37 #ifndef TEMPLATE_LAPACK_GGEV_HEADER 38 #define TEMPLATE_LAPACK_GGEV_HEADER 43 a,
const integer *lda, Treal *b,
const integer *ldb, Treal *alphar,
44 Treal *alphai, Treal *beta, Treal *vl,
const integer *ldvl,
189 integer a_dim1, a_offset, b_dim1, b_offset, vl_dim1, vl_offset, vr_dim1,
190 vr_offset, i__1, i__2;
191 Treal d__1, d__2, d__3, d__4;
206 integer ijobvl, iright, ijobvr;
207 Treal anrmto, bnrmto;
214 #define a_ref(a_1,a_2) a[(a_2)*a_dim1 + a_1] 215 #define b_ref(a_1,a_2) b[(a_2)*b_dim1 + a_1] 216 #define vl_ref(a_1,a_2) vl[(a_2)*vl_dim1 + a_1] 217 #define vr_ref(a_1,a_2) vr[(a_2)*vr_dim1 + a_1] 221 a_offset = 1 + a_dim1 * 1;
224 b_offset = 1 + b_dim1 * 1;
230 vl_offset = 1 + vl_dim1 * 1;
233 vr_offset = 1 + vr_dim1 * 1;
266 lquery = *lwork == -1;
269 }
else if (ijobvr <= 0) {
277 }
else if (*ldvl < 1 || ( ilvl && *ldvl < *n ) ) {
279 }
else if (*ldvr < 1 || ( ilvr && *ldvr < *n ) ) {
292 if (*info == 0 && (*lwork >= 1 || lquery)) {
296 i__1 = 1, i__2 = *n << 3;
298 work[1] = (Treal) maxwrk;
301 if (*lwork < minwrk && ! lquery) {
323 bignum = 1. / smlnum;
326 bignum = 1. / smlnum;
332 if (anrm > 0. && anrm < smlnum) {
335 }
else if (anrm > bignum) {
348 if (bnrm > 0. && bnrm < smlnum) {
351 }
else if (bnrm > bignum) {
367 ileft], &work[iright], &work[iwrk], &ierr);
372 irows = ihi + 1 - ilo;
374 icols = *n + 1 - ilo;
380 i__1 = *lwork + 1 - iwrk;
387 i__1 = *lwork + 1 - iwrk;
389 char str_L[] = {
'L', 0};
390 char str_T[] = {
'T', 0};
392 itau], &
a_ref(ilo, ilo), lda, &work[iwrk], &i__1, &ierr);
404 i__1 = *lwork + 1 - iwrk;
406 &work[iwrk], &i__1, &ierr);
424 ldb, &vl[vl_offset], ldvl, &vr[vr_offset], ldvr, &ierr);
427 b_ref(ilo, ilo), ldb, &vl[vl_offset], ldvl, &vr[vr_offset],
437 *(
unsigned char *)chtemp =
'S';
439 *(
unsigned char *)chtemp =
'E';
441 i__1 = *lwork + 1 - iwrk;
443 b_offset], ldb, &alphar[1], &alphai[1], &beta[1], &vl[vl_offset],
444 ldvl, &vr[vr_offset], ldvr, &work[iwrk], &i__1, &ierr);
446 if (ierr > 0 && ierr <= *n) {
448 }
else if (ierr > *n && ierr <= *n << 1) {
462 *(
unsigned char *)chtemp =
'B';
464 *(
unsigned char *)chtemp =
'L';
467 *(
unsigned char *)chtemp =
'R';
470 &vl[vl_offset], ldvl, &vr[vr_offset], ldvr, n, &in, &work[
482 vl[vl_offset], ldvl, &ierr);
484 for (jc = 1; jc <= i__1; ++jc) {
485 if (alphai[jc] < 0.) {
489 if (alphai[jc] == 0.) {
491 for (jr = 1; jr <= i__2; ++jr) {
500 for (jr = 1; jr <= i__2; ++jr) {
512 if (alphai[jc] == 0.) {
514 for (jr = 1; jr <= i__2; ++jr) {
520 for (jr = 1; jr <= i__2; ++jr) {
532 vr[vr_offset], ldvr, &ierr);
534 for (jc = 1; jc <= i__1; ++jc) {
535 if (alphai[jc] < 0.) {
539 if (alphai[jc] == 0.) {
541 for (jr = 1; jr <= i__2; ++jr) {
550 for (jr = 1; jr <= i__2; ++jr) {
562 if (alphai[jc] == 0.) {
564 for (jr = 1; jr <= i__2; ++jr) {
570 for (jr = 1; jr <= i__2; ++jr) {
601 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:42
#define absMACRO(x)
Definition: template_blas_common.h:47
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:42
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:43
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:42
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:42
int integer
Definition: template_blas_common.h:40
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:281
#define maxMACRO(a, b)
Definition: template_blas_common.h:45
int template_lapack_labad(Treal *small, Treal *large)
Definition: template_lapack_labad.h:42
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:42
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:42
int template_blas_erbla(const char *srname, integer *info)
Definition: template_blas_common.cc:146
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:42
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:42
Treal template_lapack_lamch(const char *cmach, Treal dummyReal)
Definition: template_lapack_lamch.h:202
bool logical
Definition: template_blas_common.h:41
#define TRUE_
Definition: template_lapack_common.h:42
#define FALSE_
Definition: template_lapack_common.h:43
int ftnlen
Definition: template_blas_common.h:42
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:42
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:42
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:42
Treal template_blas_sqrt(Treal x)
logical template_blas_lsame(const char *ca, const char *cb)
Definition: template_blas_common.cc:46
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:46