Skip to content

TBB and parallel stl? #2512

Answered by AlexGuteniev
indigox4 asked this question in Q&A
Discussion options

You must be logged in to vote

Regarding the number of chunks. There's a deliberate oversubscription

STL/stl/inc/execution

Lines 69 to 71 in bbd5dba

constexpr size_t _Oversubscription_multiplier = 32;
constexpr size_t _Oversubmission_multiplier = 4;
constexpr size_t _Still_active = static_cast<size_t>(-1);

return (_STD min)(_Hw_threads * _Oversubscription_multiplier, _Size_count);

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…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by indigox4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants