295Explicit Parallelization Using MathWorks Toolboxes
running on 64-bits Win7, but was higher on earlier releases.
903
Therefore, to increase lab
performance, it may be better to chunk the data being sent.
Communication functions might also be useful if, for example, we have a parallel
algorithm comprising two stages with an explicit synchronization point in between:
904
step1Func = {@fun1,@fun2}; % define the function pointers for
step2Func = {@fun3,@fun4}; % our algorithm steps
dataList1 = {data1,data2}; % the corresponding parameter lists
dataList2 = {data3,data4};
spmd 2
% run the first step of the algorithm in parallel
step1Func{labindex}(dataList1{labindex});
labBarrier; % barrier synchronization
% run the second step of the ...