parfevalOnAll
Run function asynchronously on all workers in parallel pool
Description
requests the asynchronous execution of the function F = parfevalOnAll(p,fcn,numFcnOut,X1,...,Xm)fcn on all workers in
the parallel pool p. The parfevalOnAll function
evaluates fcn on each worker with input arguments
X1,...,Xm and returns numFcnOut output
arguments. You can obtain the results from the Future object
F when all workers have completed running
fcn.
requests asynchronous execution on all workers in the current parallel pool. If no pool
exists, and automatic pool creation is enabled, MATLAB® starts a new parallel pool.F = parfevalOnAll(fcn,numFcnOut,X1,...,Xm)
Note
Use parfevalOnAll instead of parfor or
spmd if you want to use clear. This preserves workspace transparency. See Ensure Transparency in parfor-Loops or spmd Statements.
Examples
Input Arguments
Output Arguments
Extended Capabilities
Version History
Introduced in R2013bSee Also
cancel | fetchNext | fetchOutputs | parallel.pool.Constant | parfeval | parpool | wait | pctRunOnAll