You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Good evening! I want to microbenchmark some ideas on modifying parallel-for worker-loop, and I don't know TBB internal architecture.
Can you please answer these questions:
Is it true that every thread that executes task from parallel-for gets it only from task_dispatcher::receive_or_steal_task? Is it the same for task_group? If no, where do parallel-for worker-threads obtain their tasks and in which cases?
Is it true that the same thread that calls task_dispatcher::receive_or_steal_task will eventually run it? If no, then who else can run it?
Which function exactly executes tasks, that are sent to parallel-for? Is it the same for task-group?
The text was updated successfully, but these errors were encountered:
Hi @blonded04,
The main task dispatch algorithm is presented in local_wait_for_all. The orders of how task will be found and executed described there.
In TBB each thread that participate in work inside the internal arena has its own task queue. It's the first place where thread goes for a next task to execute (by calling slot.get_task). If thread cannot find for in local queue it will try to steal work from other threads calling receive_or_steal_task.
Both parallel_for and task_group will utilize this algorithm during their execution.
Good evening! I want to microbenchmark some ideas on modifying
parallel-for
worker-loop, and I don't know TBB internal architecture.Can you please answer these questions:
task_dispatcher::receive_or_steal_task
? Is it the same fortask_group
? If no, where do parallel-for worker-threads obtain their tasks and in which cases?task_dispatcher::receive_or_steal_task
will eventually run it? If no, then who else can run it?task-group
?The text was updated successfully, but these errors were encountered: