How is parfor indexed?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Darin McCoy
il 11 Feb 2014
Risposto: Walter Roberson
il 11 Feb 2014
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
0 Commenti
Risposta accettata
Walter Roberson
il 11 Feb 2014
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 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Parallel for-Loops (parfor) in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!