Skip to content

Commit 78ba9ed

Browse files
committed
add tbb gaurd around tbb global control
1 parent 9066310 commit 78ba9ed

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

vpr/src/base/vpr_api.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,10 +366,13 @@ bool vpr_flow(t_vpr_setup& vpr_setup, t_arch& arch) {
366366
return true;
367367
}
368368

369+
#ifdef VPR_USE_TBB
370+
369371
/* Set this here, because tbb::global_control doesn't control anything once it's out of scope
370372
* (contrary to the name). */
371373
tbb::global_control c(tbb::global_control::max_allowed_parallelism, vpr_setup.num_workers);
372-
374+
#endif
375+
373376
{ //Pack
374377
bool pack_success = vpr_pack_flow(vpr_setup, arch);
375378

0 commit comments

Comments
 (0)