考虑遵循MATLAB代码段
indices = cell(n,1);
values = rand(m,3);
% indices{...} contains a vector of integers 1,..,m
parfor i = 1:n
currentIndices = indices{i};
currentValues = values(currentIndices,:); % each worker needs the complete values-array
end
indices
数组表示循环内values
数组的哪些行是相关的。但是,每个工作程序都会获得values
数组,因此MATLAB会警告将其广播给每个工作程序。有办法避免这种情况吗?
谢谢:)