diff options
author | Clifford Wolf <clifford@clifford.at> | 2013-03-05 19:22:59 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2013-03-05 19:22:59 +0100 |
commit | 21696c83677167b871b13545cab9618a9ce0d22c (patch) | |
tree | 941f3d8c1dfd7eec359ea8a3cd7a6ebd42c41324 /libs/subcircuit | |
parent | 29c17fddf5bcf8c7c728797739d114867570726b (diff) | |
download | yosys-21696c83677167b871b13545cab9618a9ce0d22c.tar.gz yosys-21696c83677167b871b13545cab9618a9ce0d22c.tar.bz2 yosys-21696c83677167b871b13545cab9618a9ce0d22c.zip |
Added some simple progress information to verbose subcircuit miner output
Diffstat (limited to 'libs/subcircuit')
-rw-r--r-- | libs/subcircuit/subcircuit.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/subcircuit/subcircuit.cc b/libs/subcircuit/subcircuit.cc index f9507802e..8cc5e6d92 100644 --- a/libs/subcircuit/subcircuit.cc +++ b/libs/subcircuit/subcircuit.cc @@ -1316,6 +1316,7 @@ class SubCircuit::SolverWorker if (verbose) my_printf("\nMining for frequent subcircuits of size %d using increment %d:\n", oldSetSize+increment, increment); + int count = 0; for (auto &it : poolPerGraph) { std::map<int, std::set<int>> node2sets; @@ -1326,7 +1327,7 @@ class SubCircuit::SolverWorker node2sets[node].insert(idx); } - for (int idx1 = 0; idx1 < int(it.second.size()); idx1++) + for (int idx1 = 0; idx1 < int(it.second.size()); idx1++, count++) { std::set<int> idx2set; @@ -1350,7 +1351,7 @@ class SubCircuit::SolverWorker const auto &graph = graphData[it.first].graph; if (verbose) { - my_printf("Set %s[", graphId.c_str()); + my_printf("<%d%%/%d> Found %s[", int(100*count/pool.size()), oldSetSize+increment, graphId.c_str()); bool first = true; for (int nodeIdx : mergedSet.nodes) { my_printf("%s%s", first ? "" : ",", graph.nodes[nodeIdx].nodeId.c_str()); |