Matlab Parfor with shared array?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuesta aceptada
Jason Ross
el 22 de Mzo. de 2012
You aren't doing enough work to make the overhead of starting the workers worth it.
3 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Parallel for-Loops (parfor) en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!