Making sliced variables persist between multiple PARFOR loops
Show older comments
I have a sliced variable which is to be processed over a sequence of parfor loops, each time with the same slicing pattern. I am wondering if there is a way to avoid repeating the transmission to the workers and the data slicing process multiple times. Basically, I'm looking for something like parallel.pool.Constant, but where the constant data persists in sliced form.
In the past, I have only been able to accomplish this kind of thing with an spmd block and a for-drange loop. But these are supposedly less efficient than parfor, so there is a performance penalty. It seems like a natural kind of thing that one would want to do, however. Is there any parfor-efficient alternative?
Accepted Answer
More Answers (0)
Categories
Find more on Parallel for-Loops (parfor) in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!