I have an N-by-N array, data, of constant data that needs to be accessed by each worker of a parallel pool in a parfor loop. The loop will be called several times. Unfortunately each worker does need access to the entire array.
I just learned about the parallel.pool.Constant function which helps avoid multiple transfers of data and this is already helpful. However it seems that each worker keeps its own copy of data so I am limited by available memory to a small parallel pool.
Is there a way to use only a single copy of data in a parfor loop? To make things easier let's assume we will use a local cluster only, i.e. a multi-core desktop.
thanks!
Best Answer