TBB and parallel stl? #2512
-
Can concurrent usage of TBB and the parallel versions of the stl algorithms in the same process cause thread oversubscription? Or is it possible they share the same thread pool? For example, if a TBB parallel task calls a std::sort with a parallel execution policy, could this result in many more threads created than CPU cores available to run them? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Regarding the number of chunks. There's a deliberate oversubscription Lines 69 to 71 in bbd5dba Line 249 in bbd5dba And note that these values are for a single algorithm run, other calls to parallel algorithms will have its own chunks
Apparently the resource control in parallel algorithms is still unresolved problem. See DevCom-1611069 |
Beta Was this translation helpful? Give feedback.
Regarding the number of chunks. There's a deliberate oversubscription
STL/stl/inc/execution
Lines 69 to 71 in bbd5dba
STL/stl/inc/execution
Line 249 in bbd5dba
And note that these values are for a single algorithm run, other calls to parallel algorithms will have its own chunks
Sure TBB will not use the internal
<execution>
machinery, so it will use its own accounting.<execution>
uses Windows Thread Pool with al…