15 CVM_API std::complex<float> __dotu<std::complex<float> > (
const std::complex<float>* mpd,
tint mnSize,
tint mnIncr,
const std::complex<float>* pd,
tint nIncr)
17 std::complex<float> cRes;
18 VCDOTU (&cRes, &mnSize, mpd, &mnIncr, pd, &nIncr);
23 CVM_API std::complex<double> __dotu<std::complex<double> > (
const std::complex<double>* mpd,
tint mnSize,
tint mnIncr,
const std::complex<double>* pd,
tint nIncr)
25 std::complex<double> cRes;
26 VZDOTU (&cRes, &mnSize, mpd, &mnIncr, pd, &nIncr);
31 CVM_API std::complex<float> __dotc<std::complex<float> > (
const std::complex<float>* mpd,
tint mnSize,
tint mnIncr,
const std::complex<float>* pd,
tint nIncr)
33 std::complex<float> cRes;
34 VCDOTC (&cRes, &mnSize, mpd, &mnIncr, pd, &nIncr);
39 CVM_API std::complex<double> __dotc<std::complex<double> > (
const std::complex<double>* mpd,
tint mnSize,
tint mnIncr,
const std::complex<double>* pd,
tint nIncr)
41 std::complex<double> cRes;
42 VZDOTC (&cRes, &mnSize, mpd, &mnIncr, pd, &nIncr);
52 std::complex<float> dAlpha,
54 std::complex<float> dBeta,
57 CGEMV (bLeft ? Chars::pT() : Chars::pN(),
58 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
61 m._pm(), m._pn(), &dAlpha, m._pd(), m._pldm(), v, v._pincr(), &dBeta, vRes, vRes._pincr());
68 const basic_cmatrix<double, std::complex<double> >& m,
69 std::complex<double> dAlpha,
71 std::complex<double> dBeta,
74 ZGEMV (bLeft ? Chars::pT() : Chars::pN(),
75 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
78 m._pm(), m._pn(), &dAlpha, m._pd(), m._pldm(), v, v._pincr(), &dBeta, vRes, vRes._pincr());
85 const basic_scbmatrix<float, std::complex<float> >& m,
86 std::complex<float> dAlpha,
88 std::complex<float> dBeta,
91 CGBMV (bLeft ? Chars::pT() : Chars::pN(),
92 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
95 m._pm(), m._pn(), m._pl(), m._pu(), &dAlpha, m, m._pld(), v, v._pincr(), &dBeta, vRes, vRes._pincr());
102 const basic_scbmatrix<double, std::complex<double> >& m,
103 std::complex<double> dAlpha,
105 std::complex<double> dBeta,
108 ZGBMV (bLeft ? Chars::pT() : Chars::pN(),
109 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
112 m._pm(), m._pn(), m._pl(), m._pu(), &dAlpha, m, m._pld(), v, v._pincr(), &dBeta, vRes, vRes._pincr());
118 (
const basic_schmatrix<float, std::complex<float> >& m,
119 std::complex<float> cAlpha,
121 std::complex<float> cBeta,
126 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
129 m._pm(), &cAlpha, m, m._pld(), v, v._pincr(), &cBeta, vRes, vRes._pincr());
135 (
const basic_schmatrix<double, std::complex<double> >& m,
136 std::complex<double> cAlpha,
138 std::complex<double> cBeta,
143 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
146 m._pm(), &cAlpha, m, m._pld(), v, v._pincr(), &cBeta, vRes, vRes._pincr());
153 const basic_srmatrix<float>& mArg,
157 const bool bEigVect = (mEigVect !=
nullptr);
167 const std::complex<float> one(1.F, 0.F);
171 mEigVect -> resize (1);
172 (*mEigVect)[
CVM0].set(one);
177 basic_srmatrix<float> mA (mArg);
184 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
187 &nM, mA, &nM, &ilo, &ihi, vScale, &nOutInfo);
191 SGEHRD (&nM, &ilo, &ihi, mA, &nM, vTau, &dWork, &lWork, &nOutInfo);
193 lWork =
static_cast<tint>(dWork);
196 SGEHRD (&nM, &ilo, &ihi, mA, &nM, vTau, vWork, &lWork, &nOutInfo);
204 const tint ldvl = bRightVect ? 1 : nM;
205 const tint ldvr = bRightVect ? nM : 1;
206 basic_srmatrix<float> vl (ldvl);
207 basic_srmatrix<float> vr (ldvr);
209 basic_srmatrix<float> mH (mA);
210 const char* pRL = bRightVect ? Chars::pR() : Chars::pL();
222 SORGHR (&nM, &one, &nM, bRightVect ? vr : vl, &nM, vTau, &dWork, &lWork, &nOutInfo);
224 lWork =
static_cast<tint>(dWork);
225 if (lWork > vWork.size()) vWork.resize(lWork);
227 SORGHR (&nM, &one, &nM, bRightVect ? vr : vl, &nM, vTau, vWork, &lWork, &nOutInfo);
231 #if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
232 SHSEQR (Chars::pS(), 1, Chars::pV(), 1,
234 SHSEQR (Chars::pS(), Chars::pV(),
236 &nM, &ilo, &ihi, mH, &nM, vR, vI, bRightVect ? vr : vl, &nM, &dWork, &lWork, &nOutInfo);
238 lWork =
static_cast<tint>(dWork) * 11;
239 if (lWork > vWork.size()) vWork.resize(lWork);
241 #if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
242 SHSEQR (Chars::pS(), 1, Chars::pV(), 1,
244 SHSEQR (Chars::pS(), Chars::pV(),
246 &nM, &ilo, &ihi, mH, &nM, vR, vI, bRightVect ? vr : vl, &nM, vWork, &lWork, &nOutInfo);
250 #if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
251 STREVC (pRL, 1, Chars::pB(), 1,
255 &lSelect, &nM, mH, &nM, vl, &ldvl, vr, &ldvr, &nM, &m, work, &nOutInfo);
258 basic_srmatrix<float>& v = bRightVect ? vr : vl;
259 const tint ldv = bRightVect ? ldvr : ldvl;
261 #if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
262 SGEBAK (Chars::pB(), 1, pRL, 1,
266 &nM, &ilo, &ihi, vScale, &nM, v, &ldv, &nOutInfo);
271 mEigVect -> resize (nM);
274 if (_abs(vI(i)) > basic_cvmMachMin<float>())
276 (*mEigVect)(i).assign_real (v (m));
280 (*mEigVect)(i).assign_imag (- v (m + 1));
286 (*mEigVect)(i).assign_imag (v (m + 1));
292 const float zero(0.F);
293 (*mEigVect)(i).assign_real (v (m));
294 (*mEigVect)(i).set_imag (zero);
302 #if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
303 SHSEQR (Chars::pE(), 1, Chars::pN(), 1,
305 SHSEQR (Chars::pE(), Chars::pN(),
307 &nM, &ilo, &ihi, mA, &nM, vR, vI,
nullptr, &nM, &dWork, &lWork, &nOutInfo);
309 lWork =
static_cast<tint>(dWork) * 11;
310 if (lWork > vWork.size()) vWork.resize(lWork);
312 #if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
313 SHSEQR (Chars::pE(), 1, Chars::pN(), 1,
315 SHSEQR (Chars::pE(), Chars::pN(),
317 &nM, &ilo, &ihi, mA, &nM, vR, vI,
nullptr, &nM, vWork, &lWork, &nOutInfo);
322 vRes.assign_real (vR);
323 vRes.assign_imag (vI);
331 const basic_srmatrix<double>& mArg,
335 const bool bEigVect = (mEigVect !=
nullptr);
345 vRes[
CVM0] = std::complex<double>(mArg(CVM0,CVM0), 0.);
348 const std::complex<double> one(1., 0.);
349 mEigVect -> resize (1);
350 (*mEigVect)[
CVM0].set(one);
355 basic_srmatrix<double> mA (mArg);
362 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
365 &nM, mA, &nM, &ilo, &ihi, vScale, &nOutInfo);
369 DGEHRD (&nM, &ilo, &ihi, mA, &nM, vTau, &dWork, &lWork, &nOutInfo);
371 lWork =
static_cast<tint>(dWork);
374 DGEHRD (&nM, &ilo, &ihi, mA, &nM, vTau, vWork, &lWork, &nOutInfo);
382 const tint ldvl = bRightVect ? 1 : nM;
383 const tint ldvr = bRightVect ? nM : 1;
384 basic_srmatrix<double> vl (ldvl);
385 basic_srmatrix<double> vr (ldvr);
387 basic_srmatrix<double> mH (mA);
388 const char* pRL = bRightVect ? Chars::pR() : Chars::pL();
400 DORGHR (&nM, &one, &nM, bRightVect ? vr : vl, &nM, vTau, &dWork, &lWork, &nOutInfo);
402 lWork =
static_cast<tint>(dWork);
403 if (lWork > vWork.size()) vWork.resize(lWork);
405 DORGHR (&nM, &one, &nM, bRightVect ? vr : vl, &nM, vTau, vWork, &lWork, &nOutInfo);
409 #if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
410 DHSEQR (Chars::pS(), 1, Chars::pV(), 1,
412 DHSEQR (Chars::pS(), Chars::pV(),
414 &nM, &ilo, &ihi, mH, &nM, vR, vI, bRightVect ? vr : vl, &nM, &dWork, &lWork, &nOutInfo);
416 lWork =
static_cast<tint>(dWork) * 11;
417 if (lWork > vWork.size()) vWork.resize(lWork);
419 #if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
420 DHSEQR (Chars::pS(), 1, Chars::pV(), 1,
422 DHSEQR (Chars::pS(), Chars::pV(),
424 &nM, &ilo, &ihi, mH, &nM, vR, vI, bRightVect ? vr : vl, &nM, vWork, &lWork, &nOutInfo);
428 #if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
429 DTREVC (pRL, 1, Chars::pB(), 1,
433 &lSelect, &nM, mH, &nM, vl, &ldvl, vr, &ldvr, &nM, &m, work, &nOutInfo);
436 basic_srmatrix<double>& v = bRightVect ? vr : vl;
437 const tint ldv = bRightVect ? ldvr : ldvl;
439 #if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
440 DGEBAK (Chars::pB(), 1, pRL, 1,
444 &nM, &ilo, &ihi, vScale, &nM, v, &ldv, &nOutInfo);
449 mEigVect -> resize (nM);
450 for (
tint i = CVM0; i < nM +
CVM0; i++)
452 if (_abs(vI(i)) > basic_cvmMachMin<double>())
454 (*mEigVect)(i).assign_real (v (m));
458 (*mEigVect)(i).assign_imag (- v (m + 1));
464 (*mEigVect)(i).assign_imag (v (m + 1));
470 const double zero(0.);
471 (*mEigVect)(i).assign_real (v (m));
472 (*mEigVect)(i).set_imag (zero);
480 #if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
481 DHSEQR (Chars::pE(), 1, Chars::pN(), 1,
483 DHSEQR (Chars::pE(), Chars::pN(),
485 &nM, &ilo, &ihi, mA, &nM, vR, vI,
nullptr, &nM, &dWork, &lWork, &nOutInfo);
487 lWork =
static_cast<tint>(dWork) * 11;
488 if (lWork > vWork.size()) vWork.resize(lWork);
490 #if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
491 DHSEQR (Chars::pE(), 1, Chars::pN(), 1,
493 DHSEQR (Chars::pE(), Chars::pN(),
495 &nM, &ilo, &ihi, mA, &nM, vR, vI,
nullptr, &nM, vWork, &lWork, &nOutInfo);
500 vRes.assign_real (vR);
501 vRes.assign_imag (vI);
509 const basic_scmatrix<float, std::complex<float> >& mArg,
510 basic_scmatrix<float, std::complex<float> >* mEigVect,
513 const bool bEigVect = (mEigVect !=
nullptr);
523 vRes[
CVM0] = mArg(CVM0,CVM0);
526 const std::complex<float> one(1.F, 0.F);
527 mEigVect -> resize (1);
528 (*mEigVect)[
CVM0].set(one);
533 basic_scmatrix<float, std::complex<float> > mA (mArg);
539 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
542 &nM, mA, &nM, &ilo, &ihi, vScale, &nOutInfo);
545 std::complex<float> dWork;
546 CGEHRD (&nM, &ilo, &ihi, mA, &nM, vTau, &dWork, &lWork, &nOutInfo);
547 lWork =
static_cast<tint>(dWork.real());
550 CGEHRD (&nM, &ilo, &ihi, mA, &nM, vTau, vWork, &lWork, &nOutInfo);
558 const tint ldvl = bRightVect ? 1 : nM;
559 const tint ldvr = bRightVect ? nM : 1;
560 basic_scmatrix<float, std::complex<float> > vl (ldvl);
561 basic_scmatrix<float, std::complex<float> > vr (ldvr);
564 const char* pRL = bRightVect ? Chars::pR() : Chars::pL();
576 CUNGHR (&nM, &one, &nM, bRightVect ? vr : vl, &nM, vTau, &dWork, &lWork, &nOutInfo);
577 lWork =
static_cast<tint>(dWork.real());
578 if (lWork > vWork.size()) vWork.resize(lWork);
580 CUNGHR (&nM, &one, &nM, bRightVect ? vr : vl, &nM, vTau, vWork, &lWork, &nOutInfo);
584 #if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
585 CHSEQR (Chars::pS(), 1, Chars::pV(), 1,
587 CHSEQR (Chars::pS(), Chars::pV(),
589 &nM, &ilo, &ihi, mA, &nM, vW, bRightVect ? vr : vl, &nM, &dWork, &lWork, &nOutInfo);
590 lWork =
static_cast<tint> (dWork.real()) * 11;
591 if (lWork > vWork.size()) vWork.resize(lWork);
593 #if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
594 CHSEQR (Chars::pS(), 1, Chars::pV(), 1,
596 CHSEQR (Chars::pS(), Chars::pV(),
598 &nM, &ilo, &ihi, mA, &nM, vW, bRightVect ? vr : vl, &nM, vWork, &lWork, &nOutInfo);
602 #if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
603 CTREVC (pRL, 1, Chars::pB(), 1,
607 &lSelect, &nM, mA, &nM, vl, &ldvl, vr, &ldvr, &nM, &m, work, rwork, &nOutInfo);
610 basic_scmatrix<float, std::complex<float> >& v = bRightVect ? vr : vl;
611 const tint ldv = bRightVect ? ldvr : ldvl;
613 #if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
614 CGEBAK (Chars::pB(), 1, pRL, 1,
618 &nM, &ilo, &ihi, vScale, &nM, v, &ldv, &nOutInfo);
626 #if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
627 CHSEQR (Chars::pE(), 1, Chars::pN(), 1,
629 CHSEQR (Chars::pE(), Chars::pN(),
631 &nM, &ilo, &ihi, mA, &nM, vW,
nullptr, &nM, &dWork, &lWork, &nOutInfo);
632 lWork =
static_cast<tint> (dWork.real()) * 11;
633 if (lWork > vWork.size()) vWork.resize(lWork);
635 #if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
636 CHSEQR (Chars::pE(), 1, Chars::pN(), 1,
638 CHSEQR (Chars::pE(), Chars::pN(),
640 &nM, &ilo, &ihi, mA, &nM, vW,
nullptr, &nM, vWork, &lWork, &nOutInfo);
645 vRes.assign (vW, vW.incr());
653 const basic_scmatrix<double, std::complex<double> >& mArg,
654 basic_scmatrix<double, std::complex<double> >* mEigVect,
657 const bool bEigVect = (mEigVect !=
nullptr);
667 vRes[
CVM0] = mArg(CVM0,CVM0);
670 const std::complex<double> one(1., 0.);
671 mEigVect -> resize (1);
672 (*mEigVect)[
CVM0].set(one);
677 basic_scmatrix<double, std::complex<double> > mA (mArg);
683 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
686 &nM, mA, &nM, &ilo, &ihi, vScale, &nOutInfo);
689 std::complex<double> dWork;
690 ZGEHRD (&nM, &ilo, &ihi, mA, &nM, vTau, &dWork, &lWork, &nOutInfo);
691 lWork =
static_cast<tint> (dWork.real());
694 ZGEHRD (&nM, &ilo, &ihi, mA, &nM, vTau, vWork, &lWork, &nOutInfo);
702 const tint ldvl = bRightVect ? 1 : nM;
703 const tint ldvr = bRightVect ? nM : 1;
704 basic_scmatrix<double, std::complex<double> > vl (ldvl);
705 basic_scmatrix<double, std::complex<double> > vr (ldvr);
708 const char* pRL = bRightVect ? Chars::pR() : Chars::pL();
720 ZUNGHR (&nM, &one, &nM, bRightVect ? vr : vl, &nM, vTau, &dWork, &lWork, &nOutInfo);
721 lWork =
static_cast<tint> (dWork.real());
722 if (lWork > vWork.size()) vWork.resize(lWork);
724 ZUNGHR (&nM, &one, &nM, bRightVect ? vr : vl, &nM, vTau, vWork, &lWork, &nOutInfo);
728 #if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
729 ZHSEQR (Chars::pS(), 1, Chars::pV(), 1,
731 ZHSEQR (Chars::pS(), Chars::pV(),
733 &nM, &ilo, &ihi, mA, &nM, vW, bRightVect ? vr : vl, &nM, &dWork, &lWork, &nOutInfo);
734 lWork =
static_cast<tint> (dWork.real()) * 11;
735 if (lWork > vWork.size()) vWork.resize(lWork);
737 #if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
738 ZHSEQR (Chars::pS(), 1, Chars::pV(), 1,
740 ZHSEQR (Chars::pS(), Chars::pV(),
742 &nM, &ilo, &ihi, mA, &nM, vW, bRightVect ? vr : vl, &nM, vWork, &lWork, &nOutInfo);
746 #if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
747 ZTREVC (pRL, 1, Chars::pB(), 1,
751 &lSelect, &nM, mA, &nM, vl, &ldvl, vr, &ldvr, &nM, &m, work, rwork, &nOutInfo);
754 basic_scmatrix<double, std::complex<double> >& v = bRightVect ? vr : vl;
755 const tint ldv = bRightVect ? ldvr : ldvl;
757 #if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
758 ZGEBAK (Chars::pB(), 1, pRL, 1,
762 &nM, &ilo, &ihi, vScale, &nM, v, &ldv, &nOutInfo);
770 #if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
771 ZHSEQR (Chars::pE(), 1, Chars::pN(), 1,
773 ZHSEQR (Chars::pE(), Chars::pN(),
775 &nM, &ilo, &ihi, mA, &nM, vW,
nullptr, &nM, &dWork, &lWork, &nOutInfo);
776 lWork =
static_cast<tint> (dWork.real()) * 11;
777 if (lWork > vWork.size()) vWork.resize(lWork);
779 #if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
780 ZHSEQR (Chars::pE(), 1, Chars::pN(), 1,
782 ZHSEQR (Chars::pE(), Chars::pN(),
784 &nM, &ilo, &ihi, mA, &nM, vW,
nullptr, &nM, vWork, &lWork, &nOutInfo);
789 vRes.assign (vW, vW.incr());
794 void _harvest_eig_vect(
basic_scmatrix<
float, std::complex<float> >& mEigVect,
795 const basic_srmatrix<float>& v,
798 static float zero(0.F);
800 mEigVect(i).assign_real(v(i));
801 if (i < v.
nsize() - (
TINT_ONE -
CVM0) && alphai(i) > basic_cvmMachMin<treal>()) {
802 mEigVect(i + 1).assign_real(v(i));
803 mEigVect(i).assign_imag(v(i + 1));
804 mEigVect(i + 1).assign_imag(-v(i + 1));
808 mEigVect(i).set_imag(zero);
812 void _harvest_eig_vect(
basic_scmatrix<
double, std::complex<double> >& mEigVect,
813 const basic_srmatrix<double>& v,
816 static double zero(0.);
818 mEigVect(i).assign_real(v(i));
819 if (i < v.
nsize() - (
TINT_ONE -
CVM0) && alphai(i) > basic_cvmMachMin<treal>()) {
820 mEigVect(i + 1).assign_real(v(i));
821 mEigVect(i).assign_imag(v(i + 1));
822 mEigVect(i + 1).assign_imag(-v(i + 1));
826 mEigVect(i).set_imag(zero);
836 __ggev<basic_srmatrix<float>, basic_scmatrix<float, std::complex<float> >,
838 (basic_srmatrix<float>& mA,
839 basic_srmatrix<float>& mB,
841 basic_rvector<float>& vBeta,
842 basic_scmatrix<float, std::complex<float> >* mEigVectLeft,
843 basic_scmatrix<float, std::complex<float> >* mEigVectRight)
throw (
cvmexception)
845 const char* jobvl = mEigVectLeft ==
nullptr ? Chars::pN() : Chars::pV();
846 const char* jobvr = mEigVectRight ==
nullptr ? Chars::pN() : Chars::pV();
847 const tint n = mA.nsize();
848 basic_rvector<float> alphar(n);
849 basic_rvector<float> alphai(n);
850 basic_srmatrix<float> vl(n);
851 basic_srmatrix<float> vr(n);
857 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
861 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
864 &n, mA, mA._pld(), mB, mB._pld(),
865 alphar, alphai, vBeta,
866 vl, vl._pld(), vr, vr._pld(),
867 &dWork, &lWork, &nOutInfo);
870 lWork =
static_cast<tint>(dWork);
871 basic_rvector<float> vWork(lWork);
873 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
877 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
880 &n, mA, mA._pld(), mB, mB._pld(),
881 alphar, alphai, vBeta,
882 vl, vl._pld(), vr, vr._pld(),
883 vWork, vWork._psize(), &nOutInfo);
886 if (mEigVectLeft !=
nullptr) {
887 _harvest_eig_vect(*mEigVectLeft, vl, alphai);
889 if (mEigVectRight !=
nullptr) {
890 _harvest_eig_vect(*mEigVectRight, vr, alphai);
898 __ggev<basic_srmatrix<double>, basic_scmatrix<double, std::complex<double> >,
900 (basic_srmatrix<double>& mA,
901 basic_srmatrix<double>& mB,
903 basic_rvector<double>& vBeta,
904 basic_scmatrix<double, std::complex<double> >* mEigVectLeft,
905 basic_scmatrix<double, std::complex<double> >* mEigVectRight)
throw (
cvmexception)
907 const char* jobvl = mEigVectLeft ==
nullptr ? Chars::pN() : Chars::pV();
908 const char* jobvr = mEigVectRight ==
nullptr ? Chars::pN() : Chars::pV();
909 const tint n = mA.nsize();
910 basic_rvector<double> alphar(n);
911 basic_rvector<double> alphai(n);
912 basic_srmatrix<double> vl(n);
913 basic_srmatrix<double> vr(n);
919 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
923 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
926 &n, mA, mA._pld(), mB, mB._pld(),
927 alphar, alphai, vBeta,
928 vl, vl._pld(), vr, vr._pld(),
929 &dWork, &lWork, &nOutInfo);
932 lWork =
static_cast<tint>(dWork);
933 basic_rvector<double> vWork(lWork);
935 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
939 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
942 &n, mA, mA._pld(), mB, mB._pld(),
943 alphar, alphai, vBeta,
944 vl, vl._pld(), vr, vr._pld(),
945 vWork, vWork._psize(), &nOutInfo);
948 if (mEigVectLeft !=
nullptr) {
949 _harvest_eig_vect(*mEigVectLeft, vl, alphai);
951 if (mEigVectRight !=
nullptr) {
952 _harvest_eig_vect(*mEigVectRight, vr, alphai);
959 __ggev<basic_scmatrix<float, std::complex<float> >, basic_scmatrix<float, std::complex<float> >,
961 (basic_scmatrix<float, std::complex<float> >& mA,
962 basic_scmatrix<float, std::complex<float> >& mB,
963 basic_cvector<float, std::complex<float> >& vAlpha,
964 basic_cvector<float, std::complex<float> >& vBeta,
965 basic_scmatrix<float, std::complex<float> >* mEigVectLeft,
966 basic_scmatrix<float, std::complex<float> >* mEigVectRight)
throw (
cvmexception)
968 const char* jobvl = mEigVectLeft ==
nullptr ? Chars::pN() : Chars::pV();
969 const char* jobvr = mEigVectRight ==
nullptr ? Chars::pN() : Chars::pV();
970 const tint n = mA.nsize();
971 basic_scmatrix<float, std::complex<float> > vl(n);
972 basic_scmatrix<float, std::complex<float> > vr(n);
973 basic_rvector<float> vRWork(8 * n);
975 std::complex<float> dWork;
979 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
983 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
986 &n, mA, mA._pld(), mB, mB._pld(),
988 vl, vl._pld(), vr, vr._pld(),
989 &dWork, &lWork, vRWork, &nOutInfo);
992 lWork =
static_cast<tint>(dWork.real());
993 basic_cvector<float, std::complex<float> > vWork(lWork);
995 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
999 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
1002 &n, mA, mA._pld(), mB, mB._pld(),
1004 vl, vl._pld(), vr, vr._pld(),
1005 vWork, vWork._psize(), vRWork, &nOutInfo);
1008 if (mEigVectLeft !=
nullptr) {
1011 if (mEigVectRight !=
nullptr) {
1012 *mEigVectRight = vr;
1018 __ggev<basic_scmatrix<double, std::complex<double> >, basic_scmatrix<double, std::complex<double> >,
1020 (basic_scmatrix<double, std::complex<double> >& mA,
1021 basic_scmatrix<double, std::complex<double> >& mB,
1022 basic_cvector<double, std::complex<double> >& vAlpha,
1023 basic_cvector<double, std::complex<double> >& vBeta,
1024 basic_scmatrix<double, std::complex<double> >* mEigVectLeft,
1025 basic_scmatrix<double, std::complex<double> >* mEigVectRight)
throw (
cvmexception)
1027 const char* jobvl = mEigVectLeft ==
nullptr ? Chars::pN() : Chars::pV();
1028 const char* jobvr = mEigVectRight ==
nullptr ? Chars::pN() : Chars::pV();
1029 const tint n = mA.nsize();
1030 basic_scmatrix<double, std::complex<double> > vl(n);
1031 basic_scmatrix<double, std::complex<double> > vr(n);
1032 basic_rvector<double> vRWork(8 * n);
1034 std::complex<double> dWork;
1038 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
1042 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
1045 &n, mA, mA._pld(), mB, mB._pld(),
1047 vl, vl._pld(), vr, vr._pld(),
1048 &dWork, &lWork, vRWork, &nOutInfo);
1051 lWork =
static_cast<tint>(dWork.real());
1052 basic_cvector<double, std::complex<double> > vWork(lWork);
1054 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
1058 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
1061 &n, mA, mA._pld(), mB, mB._pld(),
1063 vl, vl._pld(), vr, vr._pld(),
1064 vWork, vWork._psize(), vRWork, &nOutInfo);
1067 if (mEigVectLeft !=
nullptr) {
1070 if (mEigVectRight !=
nullptr) {
1071 *mEigVectRight = vr;