parallel computing parfor implementation

1 回表示 (過去 30 日間)
Akand Islam
Akand Islam 2015 年 5 月 1 日
回答済み: Dasharath Gulvady 2015 年 5 月 11 日
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

回答 (1 件)

Dasharath Gulvady
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.

カテゴリ

Help Center および File ExchangeParallel for-Loops (parfor) についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by