Skip to content

Commit

Permalink
Merge pull request #2394 from verilog-to-routing/add_tbb_gaurd
Browse files Browse the repository at this point in the history
Issue#2393 (add guards for tbb compilation)
  • Loading branch information
vaughnbetz authored Sep 16, 2023
2 parents f41df3b + 6c5dc4e commit 37d5928
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions vpr/src/base/vpr_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,9 +366,12 @@ bool vpr_flow(t_vpr_setup& vpr_setup, t_arch& arch) {
return true;
}

#ifdef VPR_USE_TBB

/* Set this here, because tbb::global_control doesn't control anything once it's out of scope
* (contrary to the name). */
tbb::global_control c(tbb::global_control::max_allowed_parallelism, vpr_setup.num_workers);
#endif

{ //Pack
bool pack_success = vpr_pack_flow(vpr_setup, arch);
Expand Down

0 comments on commit 37d5928

Please sign in to comment.