Matlab Parfor with shared array?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Akzeptierte Antwort
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
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Parallel for-Loops (parfor) finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!