What happens when we call a function containing a parfor loop within another parfor loop?
古いコメントを表示
Consider
answer = zeros(1,5);
parfor x1 = 1:5
answer(x1) = fun();
end
function output = fun()
R = zeros(1,10)
parfor x2 = 1:10
R(x2) = x2;
end
output = sum(R(:));
end
Is the parallelization applied only to 'x1', or is it applied to both 'x1' and 'x2'?
採用された回答
その他の回答 (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!