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!