From d229324420b804df621e945a1c3548311d7fa216 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sun, 9 Feb 2014 15:27:58 +0100 Subject: [PATCH] fixed a bug in subcircuit library with cells that have connections to itself --- libs/subcircuit/subcircuit.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/subcircuit/subcircuit.cc b/libs/subcircuit/subcircuit.cc index b4e74be6b..da2638792 100644 --- a/libs/subcircuit/subcircuit.cc +++ b/libs/subcircuit/subcircuit.cc @@ -1064,7 +1064,10 @@ class SubCircuit::SolverWorker assert(haystack.adjMatrix.at(j).count(haystackNeighbour) > 0); int haystackEdgeType = haystack.adjMatrix.at(j).at(haystackNeighbour); - for (const auto &otherCandidate : portmapCandidates[needleNeighbour]) { + std::set> &candidates = + i == needleNeighbour ? thisCandidates : portmapCandidates[needleNeighbour]; + + for (const auto &otherCandidate : candidates) { if (diCache.compare(needleEdgeType, haystackEdgeType, testCandidate, otherCandidate)) goto found_match; } -- 2.30.2