Azzera filtri
Azzera filtri

Matlab Parfor with shared array?

1 visualizzazione (ultimi 30 giorni)
Justin
Justin il 22 Mar 2012
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.

Risposta accettata

Jason Ross
Jason Ross il 22 Mar 2012
You aren't doing enough work to make the overhead of starting the workers worth it.
  3 Commenti
Justin
Justin il 22 Mar 2012
Ok, I read the link you sent and realize i need more work in the body. Thanks,
-Justin
Jason Ross
Jason Ross il 22 Mar 2012
No problem!

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Parallel for-Loops (parfor) in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by