Lets say I have a for loop of 1M iteration and I decide to use two threads. If I say grain size is 1B then tbb will create 1B tasks and roughly each thread gets 500 tasks.
The question is how do they split these tasks each other?
Is it like thread 1 get first 500 task and thread 2 gets last 500?
Or is it more like they go and pick a random task from the pool of 1B tasks?
Is there even any ordering in between tasks?
Aucun commentaire:
Enregistrer un commentaire