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.
更多回答(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!