aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2019-04-01 12:18:02 +0100
committerDavid Shah <dave@ds0.me>2019-04-01 12:18:02 +0100
commitdb152b332b310725861f98966f98e785de7f304f (patch)
tree2fd6df0ea9c85c3d74b9455c211dbc87ad2c8dd3 /common
parented4fc888debb2eb100d1476e92c87c65d72cf545 (diff)
downloadnextpnr-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>
Diffstat (limited to 'common')
-rw-r--r--common/placer_heap.cc3
1 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());