HeAP: Don't call Eigen if system is empty
Fixes #259 Signed-off-by: David Shah <dave@ds0.me>
This commit is contained in:
parent
ed4fc888de
commit
db152b332b
@ -100,7 +100,8 @@ template <typename T> struct EquationSystem
|
|||||||
void solve(std::vector<T> &x)
|
void solve(std::vector<T> &x)
|
||||||
{
|
{
|
||||||
using namespace Eigen;
|
using namespace Eigen;
|
||||||
|
if (x.empty())
|
||||||
|
return;
|
||||||
NPNR_ASSERT(x.size() == A.size());
|
NPNR_ASSERT(x.size() == A.size());
|
||||||
|
|
||||||
VectorXd vx(x.size()), vb(rhs.size());
|
VectorXd vx(x.size()), vb(rhs.size());
|
||||||
|
2
tests
2
tests
@ -1 +1 @@
|
|||||||
Subproject commit 32a683071758ee59d47e2c5cb29c87882993facd
|
Subproject commit fb53a97322c32620385af6657596681c0044a32e
|
Loading…
Reference in New Issue
Block a user