router2: Debugging

Signed-off-by: David Shah <dave@ds0.me>
This commit is contained in:
David Shah 2019-11-19 12:28:44 +00:00
parent 39b75244da
commit 3b28ba2f76

View File

@ -791,10 +791,11 @@ struct Router2
bin = 3; bin = 3;
tcs.at(bin).route_nets.push_back(ni); tcs.at(bin).route_nets.push_back(ni);
} }
log_info("%d/%d nets not multi-threadable\n", int(tcs.at(N).route_nets.size()), int(route_queue.size()));
// Multithreaded part of routing // Multithreaded part of routing
std::vector<std::thread> threads; std::vector<std::thread> threads;
for (int i = 0; i < N; i++) { for (int i = 0; i < N; i++) {
threads.emplace_back([&]() { router_thread(tcs.at(i)); }); threads.emplace_back([this, &tcs, i]() { router_thread(tcs.at(i)); });
} }
for (int i = 0; i < N; i++) for (int i = 0; i < N; i++)
threads.at(i).join(); threads.at(i).join();