Matlab Parfor with shared array?
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponse acceptée
Jason Ross
le 22 Mar 2012
You aren't doing enough work to make the overhead of starting the workers worth it.
3 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Parallel for-Loops (parfor) dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!