Matlab Parfor with shared array?
1 回表示 (過去 30 日間)
古いコメントを表示
Is there anyway to share an array between workers like below:
A = zeros(10,10)
parfor i = 1:10
for j = 1:10
A(i,j) = i*j;
end
end
I was able to run this but its slower than a regular for-loop.
0 件のコメント
採用された回答
Jason Ross
2012 年 3 月 22 日
You aren't doing enough work to make the overhead of starting the workers worth it.
3 件のコメント
その他の回答 (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!