- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
We use windows threads in addition to TBB in a way that some of our windows threads declare task_scheduler_init object and use parallel_for. Does it mean that we have some task_scheduler_init objects running at the same time, each one of them may have different num_of_threads parameter or are they all using the same scheduler with the same num_of_threads parameter?
Thanks
We use windows threads in addition to TBB in a way that some of our windows threads declare task_scheduler_init object and use parallel_for. Does it mean that we have some task_scheduler_init objects running at the same time, each one of them may have different num_of_threads parameter or are they all using the same scheduler with the same num_of_threads parameter?
Thanks
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
"are they all using the same scheduler with the same num_of_threads parameter"
Yes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Raf Schietekat
"are they all using the same scheduler with the same num_of_threads parameter"
Yes.
despite we have deffined 2 separate schedualers?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - eyalk
despite we have deffined 2 separate schedualers?
Each master thread (a thread that starts a TBB parallel algorithm or uses tasks directly) has to have a task_scheduler_init object created in it. But task_scheduler_init objects are simply proxies to one TBB worker thread pool object (which is a singleton in the process address space) and the number of threads in the pool remain the same until the pool is destroyed. And calling parallel algorithms from either one of the master threads submits tasks to the same set of worker threads.

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