Making sliced variables persist between multiple PARFOR loops
Afficher commentaires plus anciens
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?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Parallel for-Loops (parfor) dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!