16 using complex = std::complex<float>;
20 complex* b,
int* ldb,
float* s,
float* rcond,
int* rank,
21 complex* work,
int* lwork,
float* rwork,
int* info);
37 int ldb = std::max(
m_,
n_);
39 s.resize(std::min(
n_,
m_));
42 std::vector<float> rwork(5 * std::min(
m_,
n_));
47 cgelss_(&
m_, &
n_, &
nrhs_, a, &
m_, b, &ldb, s.data(), &rcond, &rank,
48 &wkopt, &lwork, rwork.data(), &info);
49 work_.resize((
int)wkopt.real());
51 int lwork = work_.size();
52 cgelss_(&
m_, &
n_, &
nrhs_, a, &
m_, b, &ldb, s.data(), &rcond, &rank,
53 work_.data(), &lwork, rwork.data(), &info);
59 std::vector<complex> work_;
Definition: LLSSolver.h:25
int m_
Definition: LLSSolver.h:44
int n_
Definition: LLSSolver.h:45
int nrhs_
Definition: LLSSolver.h:46
std::complex< float > complex
Definition: LLSSolver.h:27
Definition: SVDSolver.h:23
SVDSolver(int m, int n, int nrhs)
Definition: SVDSolver.h:25
bool Solve(complex *a, complex *b) override
Definition: SVDSolver.h:35
std::complex< float > complex
Definition: QRSolver.h:16
void cgelss_(int *m, int *n, int *nrhs, complex *a, int *lda, complex *b, int *ldb, float *s, float *rcond, int *rank, complex *work, int *lwork, float *rwork, int *info)
This file has generic helper routines for testing steps.
Definition: AntennaConfig.h:53