Are temporary variables eliminated at the end of each parfor loop on every single worker?

1 回表示 (過去 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?

採用された回答

Edric Ellis
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 件)

カテゴリ

Help Center および File ExchangeParallel for-Loops (parfor) についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by