- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
We want to use the TBB task scheduler in conjuction with native threads, for a sub-problem in an application that is already threaded otherwise. In particular, we will have several native threads that create tasks. These tasks should be processed by a global task scheduler.
From reading the TBB documentation, it is unclear to me, if for optimal performance, there should be a init object in each of the native threads that create tasks, or if we should use a global init object.
Kind regards
Thomas
We want to use the TBB task scheduler in conjuction with native threads, for a sub-problem in an application that is already threaded otherwise. In particular, we will have several native threads that create tasks. These tasks should be processed by a global task scheduler.
From reading the TBB documentation, it is unclear to me, if for optimal performance, there should be a init object in each of the native threads that create tasks, or if we should use a global init object.
Kind regards
Thomas
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We want to use the TBB task scheduler in conjuction with native threads, for a sub-problem in an application that is already threaded otherwise. In particular, we will have several native threads that create tasks. These tasks should be processed by a global task scheduler.
From reading the TBB documentation, it is unclear to me, if for optimal performance, there should be a init object in each of the native threads that create tasks, or if we should use a global init object.
From reading the TBB documentation, it is unclear to me, if for optimal performance, there should be a init object in each of the native threads that create tasks, or if we should use a global init object.
I recently ran into the same issue. You might want to have a look here
The short answer is that you need a task_scheduler_init object for each thread that uses tbb tasks (or "upper" classes such as parallel_for)
The good news is that the overhead introduced is very low (sub usecond on my test platform), provided you already created a task_scheduler_init at program start/dll load for instance.
regards
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page