Filter löschen
Filter löschen

Matlab Parfor with shared array?

1 Ansicht (letzte 30 Tage)
Justin
Justin am 22 Mär. 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.

Akzeptierte Antwort

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

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Parallel for-Loops (parfor) finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by