- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I would like to know if pthread_create is called each time when parallel_for or parallel_reduce is invoked.
Thanks,
Zhongze
I would like to know if pthread_create is called each time when parallel_for or parallel_reduce is invoked.
Thanks,
Zhongze
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - zhongzel@gmail.com
I would like to know if pthread_create is called each time when parallel_for or parallel_reduce is invoked.
Nope. By the time parallel_for or parallel_reduce are invoked, the threads for TBB's use should have already been created. When you create the first task_scheduler_init object (if not declared deferred), one of the initialization steps is to create the worker thread pool. On Linux and MacOS machines, that's when pthread_create will be called.
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