HeAP: Don't call Eigen if system is empty

Fixes #259

Signed-off-by: David Shah <dave@ds0.me>
This commit is contained in:
David Shah 2019-04-01 12:18:02 +01:00
parent ed4fc888de
commit db152b332b
2 changed files with 3 additions and 2 deletions

View File

@ -100,7 +100,8 @@ template <typename T> struct EquationSystem
void solve(std::vector<T> &x)
{
using namespace Eigen;
if (x.empty())
return;
NPNR_ASSERT(x.size() == A.size());
VectorXd vx(x.size()), vb(rhs.size());

2
tests

@ -1 +1 @@
Subproject commit 32a683071758ee59d47e2c5cb29c87882993facd
Subproject commit fb53a97322c32620385af6657596681c0044a32e