diff --git a/dcalc/DmpCeff.cc b/dcalc/DmpCeff.cc index c00f85aa..0d3c8e91 100644 --- a/dcalc/DmpCeff.cc +++ b/dcalc/DmpCeff.cc @@ -1516,7 +1516,7 @@ DmpCeffDelayCalc::gateDelay(const Pin *drvr_pin, dcalc_result.setGateDelay(gate_delay); dcalc_result.setDrvrSlew(drvr_slew); - for (const auto [load_pin, load_idx] : load_pin_index_map) { + for (const auto &[load_pin, load_idx] : load_pin_index_map) { ArcDelay wire_delay; Slew load_slew; loadDelaySlew(load_pin, drvr_slew, rf, drvr_library, parasitic, diff --git a/search/Bfs.cc b/search/Bfs.cc index 62d26196..eced2dd3 100644 --- a/search/Bfs.cc +++ b/search/Bfs.cc @@ -190,14 +190,15 @@ BfsIterator::visitParallel(Level to_level, else { size_t from = 0; size_t chunk_size = vertex_count / thread_count; + BfsIndex bfs_index = bfs_index_; for (size_t k = 0; k < thread_count; k++) { // Last thread gets the left overs. size_t to = (k == thread_count - 1) ? vertex_count : from + chunk_size; - dispatch_queue_->dispatch( [&](int) { + dispatch_queue_->dispatch( [=](int) { for (size_t i = from; i < to; i++) { Vertex *vertex = level_vertices[i]; if (vertex) { - vertex->setBfsInQueue(bfs_index_, false); + vertex->setBfsInQueue(bfs_index, false); visitors[k]->visit(vertex); } }