Skip to content

Commit 7f25f68

Browse files
committed
Add a global control for TBB
1 parent 6df5b0b commit 7f25f68

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • ElementsExamples/src/program

‎ElementsExamples/src/program/Tbb.cpp‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ class Tbb : public Program {
3333

3434
auto log = Logging::getLogger("Tbb");
3535

36-
const auto start = high_resolution_clock::now();
36+
const auto start = high_resolution_clock::now();
37+
tbb::global_control control(tbb::global_control::max_allowed_parallelism, 8);
3738

3839
const int first_number = 1;
3940
const int last_number = 10001;

0 commit comments

Comments
 (0)