20 std::complex<float> dAlpha,
22 std::complex<float> dBeta)
24 #if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
25 CGEMM (bTrans1 ? Chars::pC() : Chars::pN(), 1, bTrans2 ? Chars::pC() : Chars::pN(), 1,
27 CGEMM (bTrans1 ? Chars::pC() : Chars::pN(), bTrans2 ? Chars::pC() : Chars::pN(),
29 bTrans1 ? ml._pn() : ml._pm(),
30 bTrans2 ? mr._pm() : mr._pn(),
31 bTrans1 ? ml._pm() : ml._pn(),
44 std::complex<double> dAlpha,
46 std::complex<double> dBeta)
48 #if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
49 ZGEMM (bTrans1 ? Chars::pC() : Chars::pN(), 1, bTrans2 ? Chars::pC() : Chars::pN(), 1,
51 ZGEMM (bTrans1 ? Chars::pC() : Chars::pN(), bTrans2 ? Chars::pC() : Chars::pN(),
53 bTrans1 ? ml._pn() : ml._pm(),
54 bTrans2 ? mr._pm() : mr._pn(),
55 bTrans1 ? ml._pm() : ml._pn(),
67 const basic_schmatrix<float, std::complex<float> >& ml,
69 std::complex<float> dAlpha,
71 std::complex<float> dBeta)
73 CHEMM (bLeft ? Chars::pL() : Chars::pR(),
74 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
78 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
81 mRes._pm(), mRes._pn(),
93 const basic_schmatrix<double, std::complex<double> >& ml,
95 std::complex<double> dAlpha,
97 std::complex<double> dBeta)
99 ZHEMM (bLeft ? Chars::pL() : Chars::pR(),
100 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
104 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
107 mRes._pm(), mRes._pn(),
117 __herk<float, std::complex<float>, basic_schmatrix<float, std::complex<float> > >
120 const std::complex<float>* pA,
tint ldA,
121 float beta, basic_schmatrix<float, std::complex<float> >& m)
124 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
127 bTransp ? Chars::pC() : Chars::pN(),
128 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
131 m._pm(), &k, &alpha, pA, &ldA, &beta, m, m._pld());
136 __herk<double, std::complex<double>, basic_schmatrix<double, std::complex<double> > >
138 double alpha,
tint k,
139 const std::complex<double>* pA,
tint ldA,
140 double beta, basic_schmatrix<double, std::complex<double> >& m)
143 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
146 bTransp ? Chars::pC() : Chars::pN(),
147 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
150 m._pm(), &k, &alpha, pA, &ldA, &beta, m, m._pld());
155 __her2k<float, std::complex<float>, basic_schmatrix<float, std::complex<float> > >
157 std::complex<float> alpha,
tint k,
158 const std::complex<float>* pA,
tint ldA,
159 const std::complex<float>* pB,
tint ldB,
160 float beta, basic_schmatrix<float, std::complex<float> >& m)
163 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
166 bTransp ? Chars::pC() : Chars::pN(),
167 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
170 m._pm(), &k, &alpha, pA, &ldA, pB, &ldB, &beta, m, m._pld());
175 __her2k<double, std::complex<double>, basic_schmatrix<double, std::complex<double> > >
177 std::complex<double> alpha,
tint k,
178 const std::complex<double>* pA,
tint ldA,
179 const std::complex<double>* pB,
tint ldB,
180 double beta, basic_schmatrix<double, std::complex<double> >& m)
183 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
186 bTransp ? Chars::pC() : Chars::pN(),
187 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
190 m._pm(), &k, &alpha, pA, &ldA, pB, &ldB, &beta, m, m._pld());
202 const tint nN = mArg.nsize();
203 const tint nK = _cvm_min<tint>(nM, nN);
211 std::complex<float> dWork;
214 CGEQRF (&nM, &nN, mQ._pd(), mQ._pld(), vTau, &dWork, &lWork, &nOutInfo);
215 lWork =
static_cast<tint>(dWork.real());
219 CGEQRF (&nM, &nN, mQ._pd(), mQ._pld(), vTau, vWork, &lWork, &nOutInfo);
225 for (
tint col = row; col < nN +
CVM0; ++col)
226 mR(row,col) = mQ(row,col);
230 CUNGQR (&nM, &nK, &nK, mQ._pd(), mQ._pld(), vTau, &dWork, &lWork, &nOutInfo);
231 lWork =
static_cast<tint>(dWork.real());
232 if (lWork > vWork.size()) vWork.resize(lWork);
235 CUNGQR (&nM, &nK, &nK, mQ._pd(), mQ._pld(), vTau, vWork, &lWork, &nOutInfo);
248 const tint nN = mArg.nsize();
249 const tint nK = _cvm_min<tint>(nM, nN);
257 std::complex<double> dWork;
260 ZGEQRF (&nM, &nN, mQ._pd(), mQ._pld(), vTau, &dWork, &lWork, &nOutInfo);
261 lWork =
static_cast<tint>(dWork.real());
265 ZGEQRF (&nM, &nN, mQ._pd(), mQ._pld(), vTau, vWork, &lWork, &nOutInfo);
270 for (
tint row = CVM0; row < nK +
CVM0; ++row)
271 for (
tint col = row; col < nN +
CVM0; ++col)
272 mR(row,col) = mQ(row,col);
276 ZUNGQR (&nM, &nK, &nK, mQ._pd(), mQ._pld(), vTau, &dWork, &lWork, &nOutInfo);
277 lWork =
static_cast<tint>(dWork.real());
278 if (lWork > vWork.size()) vWork.resize(lWork);
281 ZUNGQR (&nM, &nK, &nK, mQ._pd(), mQ._pld(), vTau, vWork, &lWork, &nOutInfo);
294 const tint nN = mArg.nsize();
295 const tint nK = _cvm_min<tint>(nM, nN);
301 mA.assign (CVM0, CVM0, mArg);
308 std::complex<float> dWork;
311 CGEQRF (&nM, &nN, mA, mA._pld(), vTau, &dWork, &lWork, &nOutInfo);
312 lWork =
static_cast<tint>(dWork.real());
316 CGEQRF (&nM, &nN, mA, mA._pld(), vTau, vWork, &lWork, &nOutInfo);
321 for (row = CVM0; row < nK +
CVM0; ++row)
322 for (col = row; col < nN +
CVM0; ++col)
323 mR(row,col) = mA(row,col);
327 CUNGQR (&nM, &nM, &nK, mA, mA._pld(), vTau, &dWork, &lWork, &nOutInfo);
328 lWork =
static_cast<tint>(dWork.real());
329 if (lWork > vWork.size()) vWork.resize(lWork);
332 CUNGQR (&nM, &nM, &nK, mA, mA._pld(), vTau, vWork, &lWork, &nOutInfo);
337 mQ.assign (CVM0, CVM0, mA);
339 for (row = CVM0; row < nM +
CVM0; ++row)
340 for (col = CVM0; col < nM +
CVM0; ++col)
341 mQ(row,col) = mA(row,col);
353 const tint nN = mArg.nsize();
354 const tint nK = _cvm_min<tint>(nM, nN);
360 mA.assign (CVM0, CVM0, mArg);
367 std::complex<double> dWork;
370 ZGEQRF (&nM, &nN, mA, mA._pld(), vTau, &dWork, &lWork, &nOutInfo);
371 lWork =
static_cast<tint>(dWork.real());
375 ZGEQRF (&nM, &nN, mA, mA._pld(), vTau, vWork, &lWork, &nOutInfo);
380 for (row = CVM0; row < nK +
CVM0; ++row)
381 for (col = row; col < nN +
CVM0; ++col)
382 mR(row,col) = mA(row,col);
386 ZUNGQR (&nM, &nM, &nK, mA, mA._pld(), vTau, &dWork, &lWork, &nOutInfo);
387 lWork =
static_cast<tint>(dWork.real());
388 if (lWork > vWork.size()) vWork.resize(lWork);
391 ZUNGQR (&nM, &nM, &nK, mA, mA._pld(), vTau, vWork, &lWork, &nOutInfo);
396 mQ.assign (CVM0, CVM0, mA);
398 for (row = CVM0; row < nM +
CVM0; ++row)
399 for (col = CVM0; col < nM +
CVM0; ++col)
400 mQ(row,col) = mA(row,col);
413 const tint nN = mArg.nsize();
423 std::complex<float> dWork;
426 CGERQF (&nM, &nN, mQ, mQ._pld(), vTau, &dWork, &lWork, &nOutInfo);
427 lWork =
static_cast<tint>(dWork.real());
431 CGERQF (&nM, &nN, mQ, mQ._pld(), vTau, vWork, &lWork, &nOutInfo);
436 for (row = CVM0; row < nM +
CVM0; ++row)
437 for (col = row; col < nM +
CVM0; ++col)
438 mR(row,col) = mQ(row,nN - nM + col);
442 CUNGRQ (&nM, &nN, &nM, mQ, mQ._pld(), vTau, &dWork, &lWork, &nOutInfo);
443 lWork =
static_cast<tint>(dWork.real());
444 if (lWork > vWork.size()) vWork.resize(lWork);
447 CUNGRQ (&nM, &nN, &nM, mQ, mQ._pld(), vTau, vWork, &lWork, &nOutInfo);
461 const tint nN = mArg.nsize();
471 std::complex<double> dWork;
474 ZGERQF (&nM, &nN, mQ, mQ._pld(), vTau, &dWork, &lWork, &nOutInfo);
475 lWork =
static_cast<tint>(dWork.real());
479 ZGERQF (&nM, &nN, mQ, mQ._pld(), vTau, vWork, &lWork, &nOutInfo);
484 for (row = CVM0; row < nM +
CVM0; ++row)
485 for (col = row; col < nM +
CVM0; ++col)
486 mR(row,col) = mQ(row,nN - nM + col);
490 ZUNGRQ (&nM, &nN, &nM, mQ, mQ._pld(), vTau, &dWork, &lWork, &nOutInfo);
491 lWork =
static_cast<tint>(dWork.real());
492 if (lWork > vWork.size()) vWork.resize(lWork);
495 ZUNGRQ (&nM, &nN, &nM, mQ, mQ._pld(), vTau, vWork, &lWork, &nOutInfo);
509 const tint nN = mArg.nsize();
515 mA.assign (CVM0, CVM0, mArg);
522 std::complex<float> dWork;
525 CGERQF (&nM, &nN, mA, mA._pld(), vTau, &dWork, &lWork, &nOutInfo);
526 lWork =
static_cast<tint>(dWork.real());
530 CGERQF (&nM, &nN, mA, mA._pld(), vTau, vWork, &lWork, &nOutInfo);
535 for (row = CVM0; row < nM +
CVM0; ++row)
536 for (col = nN - nM + row; col < nN +
CVM0; ++col)
537 mR(row,col) = mA(row,col);
541 CUNGRQ (&nM, &nN, &nM, mA, mA._pld(), vTau, &dWork, &lWork, &nOutInfo);
542 lWork =
static_cast<tint>(dWork.real());
543 if (lWork > vWork.size()) vWork.resize(lWork);
546 CUNGRQ (&nM, &nN, &nM, mA, mA._pld(), vTau, vWork, &lWork, &nOutInfo);
549 for (row = CVM0; row < nM +
CVM0; ++row)
550 for (col = CVM0; col < nN +
CVM0; ++col)
551 mQ(nN - nM + row,col) = mA(row,col);
564 const tint nN = mArg.nsize();
570 mA.assign (CVM0, CVM0, mArg);
577 std::complex<double> dWork;
580 ZGERQF (&nM, &nN, mA, mA._pld(), vTau, &dWork, &lWork, &nOutInfo);
581 lWork =
static_cast<tint>(dWork.real());
585 ZGERQF (&nM, &nN, mA, mA._pld(), vTau, vWork, &lWork, &nOutInfo);
590 for (row = CVM0; row < nM +
CVM0; ++row)
591 for (col = nN - nM + row; col < nN +
CVM0; ++col)
592 mR(row,col) = mA(row,col);
596 ZUNGRQ (&nM, &nN, &nM, mA, mA._pld(), vTau, &dWork, &lWork, &nOutInfo);
597 lWork =
static_cast<tint>(dWork.real());
598 if (lWork > vWork.size()) vWork.resize(lWork);
601 ZUNGRQ (&nM, &nN, &nM, mA, mA._pld(), vTau, vWork, &lWork, &nOutInfo);
604 for (row = CVM0; row < nM +
CVM0; ++row)
605 for (col = CVM0; col < nN +
CVM0; ++col)
606 mQ(nN - nM + row,col) = mA(row,col);
618 const tint nN = mArg.nsize();
619 const tint nK = _cvm_min<tint>(nM, nN);
627 std::complex<float> dWork;
630 CGELQF (&nM, &nN, mQ._pd(), mQ._pld(), vTau, &dWork, &lWork, &nOutInfo);
631 lWork =
static_cast<tint>(dWork.real());
635 CGELQF (&nM, &nN, mQ._pd(), mQ._pld(), vTau, vWork, &lWork, &nOutInfo);
640 for (
tint col = CVM0; col < nK +
CVM0; ++col)
641 for (
tint row = col; row < nM +
CVM0; ++row)
642 mL(row,col) = mQ(row,col);
646 CUNGLQ (&nK, &nN, &nK, mQ._pd(), mQ._pld(), vTau, &dWork, &lWork, &nOutInfo);
647 lWork =
static_cast<tint>(dWork.real());
648 if (lWork > vWork.size()) vWork.resize(lWork);
651 CUNGLQ (&nK, &nN, &nK, mQ._pd(), mQ._pld(), vTau, vWork, &lWork, &nOutInfo);
664 const tint nN = mArg.nsize();
665 const tint nK = _cvm_min<tint>(nM, nN);
673 std::complex<double> dWork;
676 ZGELQF (&nM, &nN, mQ._pd(), mQ._pld(), vTau, &dWork, &lWork, &nOutInfo);
677 lWork =
static_cast<tint>(dWork.real());
681 ZGELQF (&nM, &nN, mQ._pd(), mQ._pld(), vTau, vWork, &lWork, &nOutInfo);
686 for (
tint col = CVM0; col < nK +
CVM0; ++col)
687 for (
tint row = col; row < nM +
CVM0; ++row)
688 mL(row,col) = mQ(row,col);
692 ZUNGLQ (&nK, &nN, &nK, mQ._pd(), mQ._pld(), vTau, &dWork, &lWork, &nOutInfo);
693 lWork =
static_cast<tint>(dWork.real());
694 if (lWork > vWork.size()) vWork.resize(lWork);
697 ZUNGLQ (&nK, &nN, &nK, mQ._pd(), mQ._pld(), vTau, vWork, &lWork, &nOutInfo);
710 const tint nN = mArg.nsize();
711 const tint nK = _cvm_min<tint>(nM, nN);
717 mA.assign (CVM0, CVM0, mArg);
724 std::complex<float> dWork;
727 CGELQF (&nM, &nN, mA, mA._pld(), vTau, &dWork, &lWork, &nOutInfo);
728 lWork =
static_cast<tint>(dWork.real());
732 CGELQF (&nM, &nN, mA, mA._pld(), vTau, vWork, &lWork, &nOutInfo);
737 for (col = CVM0; col < nK +
CVM0; ++col)
738 for (row = col; row < nM +
CVM0; ++row)
739 mL(row,col) = mA(row,col);
743 CUNGLQ (&nN, &nN, &nK, mA._pd(), mA._pld(), vTau, &dWork, &lWork, &nOutInfo);
744 lWork =
static_cast<tint>(dWork.real());
745 if (lWork > vWork.size()) vWork.resize(lWork);
748 CUNGLQ (&nN, &nN, &nK, mA._pd(), mA._pld(), vTau, vWork, &lWork, &nOutInfo);
753 mQ.assign (CVM0, CVM0, mA);
755 for (row = CVM0; row < nN +
CVM0; ++row)
756 for (col = CVM0; col < nN +
CVM0; ++col)
757 mQ(row,col) = mA(row,col);
769 const tint nN = mArg.nsize();
770 const tint nK = _cvm_min<tint>(nM, nN);
776 mA.assign (CVM0, CVM0, mArg);
783 std::complex<double> dWork;
786 ZGELQF (&nM, &nN, mA, mA._pld(), vTau, &dWork, &lWork, &nOutInfo);
787 lWork =
static_cast<tint>(dWork.real());
791 ZGELQF (&nM, &nN, mA, mA._pld(), vTau, vWork, &lWork, &nOutInfo);
796 for (col = CVM0; col < nK +
CVM0; ++col)
797 for (row = col; row < nM +
CVM0; ++row)
798 mL(row,col) = mA(row,col);
802 ZUNGLQ (&nN, &nN, &nK, mA._pd(), mA._pld(), vTau, &dWork, &lWork, &nOutInfo);
803 lWork =
static_cast<tint>(dWork.real());
804 if (lWork > vWork.size()) vWork.resize(lWork);
807 ZUNGLQ (&nN, &nN, &nK, mA._pd(), mA._pld(), vTau, vWork, &lWork, &nOutInfo);
812 mQ.assign (CVM0, CVM0, mA);
814 for (row = CVM0; row < nN +
CVM0; ++row)
815 for (col = CVM0; col < nN +
CVM0; ++col)
816 mQ(row,col) = mA(row,col);
829 const tint nN = mArg.nsize();
830 const tint nK = _cvm_min<tint>(nM, nN);
838 std::complex<float> dWork;
841 CGEQLF (&nM, &nN, mQ._pd(), mQ._pld(), vTau, &dWork, &lWork, &nOutInfo);
842 lWork =
static_cast<tint>(dWork.real());
846 CGEQLF (&nM, &nN, mQ._pd(), mQ._pld(), vTau, vWork, &lWork, &nOutInfo);
851 for (
tint col = CVM0; col < nN +
CVM0; ++col)
852 for (
tint row = col; row < nK +
CVM0; ++row)
853 mL(row,col) = mQ(nM - nN + row,col);
857 CUNGQL (&nM, &nN, &nK, mQ._pd(), mQ._pld(), vTau, &dWork, &lWork, &nOutInfo);
858 lWork =
static_cast<tint>(dWork.real());
859 if (lWork > vWork.size()) vWork.resize(lWork);
862 CUNGQL (&nM, &nN, &nK, mQ._pd(), mQ._pld(), vTau, vWork, &lWork, &nOutInfo);
876 const tint nN = mArg.nsize();
877 const tint nK = _cvm_min<tint>(nM, nN);
885 std::complex<double> dWork;
888 ZGEQLF (&nM, &nN, mQ._pd(), mQ._pld(), vTau, &dWork, &lWork, &nOutInfo);
889 lWork =
static_cast<tint>(dWork.real());
893 ZGEQLF (&nM, &nN, mQ._pd(), mQ._pld(), vTau, vWork, &lWork, &nOutInfo);
898 for (
tint col = CVM0; col < nN +
CVM0; ++col)
899 for (
tint row = col; row < nK +
CVM0; ++row)
900 mL(row,col) = mQ(nM - nN + row,col);
904 ZUNGQL (&nM, &nN, &nK, mQ._pd(), mQ._pld(), vTau, &dWork, &lWork, &nOutInfo);
905 lWork =
static_cast<tint>(dWork.real());
906 if (lWork > vWork.size()) vWork.resize(lWork);
909 ZUNGQL (&nM, &nN, &nK, mQ._pd(), mQ._pld(), vTau, vWork, &lWork, &nOutInfo);
923 const tint nN = mArg.nsize();
929 mA.assign (CVM0, CVM0, mArg);
936 std::complex<float> dWork;
939 CGEQLF (&nM, &nN, mA, mA._pld(), vTau, &dWork, &lWork, &nOutInfo);
940 lWork =
static_cast<tint>(dWork.real());
944 CGEQLF (&nM, &nN, mA, mA._pld(), vTau, vWork, &lWork, &nOutInfo);
949 for (col = CVM0; col < nN +
CVM0; ++col)
950 for (row = nM - nN + col; row < nM +
CVM0; ++row)
951 mL(row,col) = mA(row,col);
955 CUNGQL (&nM, &nN, &nN, mA, mA._pld(), vTau, &dWork, &lWork, &nOutInfo);
956 lWork =
static_cast<tint>(dWork.real());
957 if (lWork > vWork.size()) vWork.resize(lWork);
960 CUNGQL (&nM, &nN, &nN, mA, mA._pld(), vTau, vWork, &lWork, &nOutInfo);
963 for (row = CVM0; row < nM +
CVM0; ++row)
964 for (col = CVM0; col < nN +
CVM0; ++col)
965 mQ(row,nM - nN + col) = mA(row,col);
978 const tint nN = mArg.nsize();
984 mA.assign (CVM0, CVM0, mArg);
991 std::complex<double> dWork;
994 ZGEQLF (&nM, &nN, mA, mA._pld(), vTau, &dWork, &lWork, &nOutInfo);
995 lWork =
static_cast<tint>(dWork.real());
999 ZGEQLF (&nM, &nN, mA, mA._pld(), vTau, vWork, &lWork, &nOutInfo);
1004 for (col = CVM0; col < nN +
CVM0; ++col)
1005 for (row = nM - nN + col; row < nM +
CVM0; ++row)
1006 mL(row,col) = mA(row,col);
1010 ZUNGQL (&nM, &nN, &nN, mA, mA._pld(), vTau, &dWork, &lWork, &nOutInfo);
1011 lWork =
static_cast<tint>(dWork.real());
1012 if (lWork > vWork.size()) vWork.resize(lWork);
1015 ZUNGQL (&nM, &nN, &nN, mA, mA._pld(), vTau, vWork, &lWork, &nOutInfo);
1018 for (row = CVM0; row < nM +
CVM0; ++row)
1019 for (col = CVM0; col < nN +
CVM0; ++col)
1020 mQ(row,nM - nN + col) = mA(row,col);
1033 const tint nM = mA.msize();
1034 const tint nN = mA.nsize();
1035 const tint nL = _cvm_min<tint>(nM, nN);
1036 const tint nK = _cvm_max<tint>(nM, nN);
1037 const tint nrhs = mB.nsize();
1040 std::complex<float> dWork;
1041 const char* trans = transpose ? Chars::pC() : Chars::pN();
1043 mX.resize(nK, nrhs);
1044 mX.assign(CVM0, CVM0, mB);
1048 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
1051 &nM, &nN, &nrhs, mA._pd(), mA._pld(), mX._pd(), mX._pld(), &dWork, &lWork, &nOutInfo);
1053 lWork =
static_cast<tint>(dWork.real());
1057 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
1060 &nM, &nN, &nrhs, mA._pd(), mA._pld(), mX._pd(), mX._pld(), vWork, &lWork, &nOutInfo);
1065 if ((!transpose && nM > nN) || (transpose && nM < nN))
1067 for (
tint col = CVM0; col < nrhs +
CVM0; col++)
1069 for (
tint row = nL + CVM0; row < nK +
CVM0; row++)
1071 vErr[col] += mX(row, col)*mX(row, col);
1074 mX.resize(nL, nrhs);
1087 const tint nM = mA.msize();
1088 const tint nN = mA.nsize();
1089 const tint nL = _cvm_min<tint>(nM, nN);
1090 const tint nK = _cvm_max<tint>(nM, nN);
1091 const tint nrhs = mB.nsize();
1094 std::complex<double> dWork;
1095 const char* trans = transpose ? Chars::pC() : Chars::pN();
1097 mX.resize(nK, nrhs);
1098 mX.assign(CVM0, CVM0, mB);
1102 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
1105 &nM, &nN, &nrhs, mA._pd(), mA._pld(), mX._pd(), mX._pld(), &dWork, &lWork, &nOutInfo);
1107 lWork =
static_cast<tint>(dWork.real());
1111 #
if defined (CVM_PASS_STRING_LENGTH_TO_FTN_SUBROUTINES)
1114 &nM, &nN, &nrhs, mA._pd(), mA._pld(), mX._pd(), mX._pld(), vWork, &lWork, &nOutInfo);
1119 if ((!transpose && nM > nN) || (transpose && nM < nN))
1121 for (
tint col = CVM0; col < nrhs +
CVM0; col++)
1123 for (
tint row = nL + CVM0; row < nK +
CVM0; row++)
1125 vErr[col] += mX(row, col)*mX(row, col);
1128 mX.resize(nL, nrhs);
1135 __gelsy<float, basic_cmatrix<float, std::complex<float> > >
1145 const tint nK = _cvm_max<tint>(nM, nN);
1149 std::complex<float> dWork;
1153 mX.
assign(CVM0, CVM0, mB);
1156 CGELSY (&nM, &nN, &nrhs, mA._pd(), mA._pld(), mX._pd(), mX._pld(),
1157 jpvt, &rcond, &rank, &dWork, &lWork, rWork, &nOutInfo);
1159 lWork =
static_cast<tint>(dWork.real());
1162 CGELSY (&nM, &nN, &nrhs, mA._pd(), mA._pld(), mX._pd(), mX._pld(),
1163 jpvt, &rcond, &rank, vWork, &lWork, rWork, &nOutInfo);
1171 __gelsy<double, basic_cmatrix<double, std::complex<double> > >
1181 const tint nK = _cvm_max<tint>(nM, nN);
1185 std::complex<double> dWork;
1189 mX.
assign(CVM0, CVM0, mB);
1192 ZGELSY (&nM, &nN, &nrhs, mA._pd(), mA._pld(), mX._pd(), mX._pld(),
1193 jpvt, &rcond, &rank, &dWork, &lWork, rWork, &nOutInfo);
1195 lWork =
static_cast<tint>(dWork.real());
1198 ZGELSY (&nM, &nN, &nrhs, mA._pd(), mA._pld(), mX._pd(), mX._pld(),
1199 jpvt, &rcond, &rank, vWork, &lWork, rWork, &nOutInfo);
1217 const tint nN = mA.nsize();
1218 const tint nrhs = mB.nsize();
1219 const tint nK = _cvm_max<tint>(nM, nN);
1222 std::complex<float> dWork;
1225 mX.resize(nK, nrhs);
1226 mX.assign(CVM0, CVM0, mB);
1229 CGELSS (&nM, &nN, &nrhs, mA._pd(), mA._pld(), mX._pd(), mX._pld(),
1230 vSV, &rcond, &rank, &dWork, &lWork, rWork, &nOutInfo);
1232 lWork =
static_cast<tint>(dWork.real());
1235 CGELSS (&nM, &nN, &nrhs, mA._pd(), mA._pld(), mX._pd(), mX._pld(),
1236 vSV, &rcond, &rank, vWork, &lWork, rWork, &nOutInfo);
1239 mX.resize(nN, nrhs);
1253 const tint nN = mA.nsize();
1254 const tint nrhs = mB.nsize();
1255 const tint nK = _cvm_max<tint>(nM, nN);
1258 std::complex<double> dWork;
1261 mX.resize(nK, nrhs);
1262 mX.assign(CVM0, CVM0, mB);
1265 ZGELSS (&nM, &nN, &nrhs, mA._pd(), mA._pld(), mX._pd(), mX._pld(),
1266 vSV, &rcond, &rank, &dWork, &lWork, rWork, &nOutInfo);
1268 lWork =
static_cast<tint>(dWork.real());
1271 ZGELSS (&nM, &nN, &nrhs, mA._pd(), mA._pld(), mX._pd(), mX._pld(),
1272 vSV, &rcond, &rank, vWork, &lWork, rWork, &nOutInfo);
1275 mX.resize(nN, nrhs);
1289 const tint nN = mA.nsize();
1290 const tint nrhs = mB.nsize();
1291 const tint nK = _cvm_max<tint>(nM, nN);
1294 std::complex<float> dWork;
1298 mX.resize(nK, nrhs);
1299 mX.assign(CVM0, CVM0, mB);
1302 CGELSD (&nM, &nN, &nrhs, mA._pd(), mA._pld(), mX._pd(), mX._pld(),
1303 vSV, &rcond, &rank, &dWork, &lWork, &rWork, &iWork, &nOutInfo);
1305 lWork =
static_cast<tint>(dWork.real());
1310 CGELSD (&nM, &nN, &nrhs, mA._pd(), mA._pld(), mX._pd(), mX._pld(),
1311 vSV, &rcond, &rank, vWork, &lWork, vrWork, viWork, &nOutInfo);
1314 mX.resize(nN, nrhs);
1328 const tint nN = mA.nsize();
1329 const tint nrhs = mB.nsize();
1330 const tint nK = _cvm_max<tint>(nM, nN);
1333 std::complex<double> dWork;
1337 mX.resize(nK, nrhs);
1338 mX.assign(CVM0, CVM0, mB);
1341 ZGELSD (&nM, &nN, &nrhs, mA._pd(), mA._pld(), mX._pd(), mX._pld(),
1342 vSV, &rcond, &rank, &dWork, &lWork, &rWork, &iWork, &nOutInfo);
1344 lWork =
static_cast<tint>(dWork.real());
1349 ZGELSD (&nM, &nN, &nrhs, mA._pd(), mA._pld(), mX._pd(), mX._pld(),
1350 vSV, &rcond, &rank, vWork, &lWork, vrWork, viWork, &nOutInfo);
1353 mX.resize(nN, nrhs);