How does Intel TBB choose the number of threads to used for a parallel section?
Is there some kind of specification available?
How does Intel TBB choose the number of threads to used for a parallel section?
Is there some kind of specification available?
Documetation says just "dependent on hardware configuration". Possibly it just number of CPU cores available.
When you create the scheduler, you can specify the number of threads as
tbb::task_scheduler_init init(nthread);
else you can use
tbb::task_scheduler_init init(tbb::task_scheduler_init::automatic);
In this case, tbb scheduler creates as many threads as your CPU cores