Are temporary variables eliminated at the end of each parfor loop on every single worker?
4 次查看(过去 30 天)
显示 更早的评论
I want to know, if the temporary variables inside the parfor loop are eliminated at the end of each loop, even on a single worker?
0 个评论
采纳的回答
Edric Ellis
2020-12-8
Yes, as mentioned in the documentation https://www.mathworks.com/help/parallel-computing/temporary-variable.html temporary variables are never sent back to the client. There are two ways to get results out of a parfor loop: either use sliced output variables, or reduction output variables. These variable types are explained here https://www.mathworks.com/help/parallel-computing/troubleshoot-variables-in-parfor-loops.html .
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 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!