Matlab Parfor with shared array?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposta accettata
Jason Ross
il 22 Mar 2012
You aren't doing enough work to make the overhead of starting the workers worth it.
3 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!