How is parfor indexed?

1 回表示 (過去 30 日間)
Darin McCoy
Darin McCoy 2014 年 2 月 11 日
回答済み: Walter Roberson 2014 年 2 月 11 日
My code is below.... how is the sequence of numbers chosen for what indexes parfor decides to tackle next?
parpool;
parfor i = 1:10; disp(i); end
ans = 1
5
7
3
8
4
2
6
9
10

採用された回答

Walter Roberson
Walter Roberson 2014 年 2 月 11 日
The sequence is not documented and is subject to change even on the same run. If your body code needs to know the order the bodies are executed in, then you are not using parfor correctly (and your task might be better suited to spmd)

その他の回答 (0 件)

カテゴリ

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