parallel computing parfor implementation
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello,
Please see in attachment the sample for loop where a is 10*10 matrix with initial values.
How variable a can be controlled to implement parfor?
Thanks, Akand
댓글 수: 0
답변 (1개)
Dasharath Gulvady
2015년 5월 11일
I see in your code that each iteration is dependent on the values in the previous iteration.
var = a(i-1, j) + a(i+1,j);
This is not supported by parfor. You cannot use a parfor-loop when an iteration in your loop depends on the results of other iterations. Each iteration must be independent of all others.
댓글 수: 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!