Making sliced variables persist between multiple PARFOR loops
이전 댓글 표시
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?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Parallel for-Loops (parfor)에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!