diff options
author | David Shah <dave@ds0.me> | 2019-04-01 12:18:02 +0100 |
---|---|---|
committer | David Shah <dave@ds0.me> | 2019-04-01 12:18:02 +0100 |
commit | db152b332b310725861f98966f98e785de7f304f (patch) | |
tree | 2fd6df0ea9c85c3d74b9455c211dbc87ad2c8dd3 | |
parent | ed4fc888debb2eb100d1476e92c87c65d72cf545 (diff) | |
download | nextpnr-db152b332b310725861f98966f98e785de7f304f.tar.gz nextpnr-db152b332b310725861f98966f98e785de7f304f.tar.bz2 nextpnr-db152b332b310725861f98966f98e785de7f304f.zip |
HeAP: Don't call Eigen if system is empty
Fixes #259
Signed-off-by: David Shah <dave@ds0.me>
-rw-r--r-- | common/placer_heap.cc | 3 | ||||
m--------- | tests | 0 |
2 files changed, 2 insertions, 1 deletions
diff --git a/common/placer_heap.cc b/common/placer_heap.cc index 7caf536d..f9b639f8 100644 --- a/common/placer_heap.cc +++ b/common/placer_heap.cc @@ -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()); diff --git a/tests b/tests -Subproject 32a683071758ee59d47e2c5cb29c87882993fac +Subproject fb53a97322c32620385af6657596681c0044a32 |