- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a set of objects that I want to process in parallel. The results of this should have further processing done in serial. The gist of it is:
parallel_pipeline(ntokens,
tbb::make_filter<T,U>( tbb::filter::parallel, MyInputFunc(input_file) )
& tbb::make_filter<U,V>( tbb::filter::serial_out_of_order, MyTransformFunc() )
However, for some of the U objects, before the serial processing can start, there needs to be further processing done on child objects of it in parallel. One way to solve this would be to have a feeder into the first filter, if that's possible, and generalize it to work on T objects or on children of U objects. Another would be to have parallel_do for each U's child objects, but I don't know if that will typically introduce a lot of performance overhead. Any ideas?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for reaching out to us.
We are looking into this issue internally. We will get back to you soon.
Thanks & Regards
Noorjahan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Michael,
It seems that you don't need parallel_do() in your task. Since additional work appears at the time of U creation (the initial stage of the pipeline), then it can be performed in the same place. Nested parallelism can be used in this context. For a solution, you can use parallel_for() or task_group(): “run + wait” inside the initial stage of the pipeline.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Michael,
I think I answered your question and I'm closing this case for now. Just create an new case if you would like to continue investigation or if you have a new issue.
Thank you very much!
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page