Skip to content

introduce a parfor switch in near_fld.m

Lorenzo Pattelli requested to merge lpattelli/stratify:lorenzo-contrib into master

This commit introduces an optional argument to the near_fld function setting the number of workers for the parfor loop. The default number is set to 0, to avoid possible reproducibility issues that are sometimes associated to the use of parfor loops, and to ensure compatibility when the Parallel Computing Toolbox is not available.

In addition, the inner core radius is also assigned to a dedicated variable to suppress a warning in the code Editor regarding possible communication overhead caused by broadcasting the whole radii array to all workers, instead of only its first component.

Merge request reports