You can evaluate a function in the background without waiting
for it to complete, using
In many cases, it can be convenient to break out of a for loop early.
For example, in an optimization procedure, you can stop the loop early
when the result is good enough. You can do this on one or all parallel
pool workers, using
parfevalOnAll. This can be useful if
you want to be able to plot intermediate results. Note that this is
different from using
where you have to wait for the loop to complete.
poll together to send and poll for messages
or data from different workers using a data queue. You can use
afterEach to add a function to call
when new data is received from a data queue.
automatically invoke functions after each or after all elements of a
parallel.Future array complete. This array can contain futures returned by
Break out of a loop early and collect results as they become available.
This example shows how to perform a parallel parameter sweep with
parfeval and send results back during computations with a
You can perform asynchronous computations on workers using
parfeval and leave the user interface responsive.
This example shows how to perform frame acquisition from a webcam in parallel with data postprocessing.
This example shows how to perform image acquisition from a webcam and postprocess data in parallel.
This example shows how to run multiple deep learning experiments on your local machine.
This example shows how to use
parfeval to perform a parameter sweep on the depth of the network architecture for a deep learning network and retrieve data during training.
|Execute function asynchronously on parallel pool worker|
|Execute function asynchronously on all workers in parallel pool|
|Start counting bytes transferred within parallel pool|
|Read how many bytes have been transferred since calling |
|Send data from worker to client using a data queue|
|Retrieve data sent from a worker|
|Define a function to call when new data is received on a DataQueue|
|Specify a function to invoke after each parallel.Future completes|
|Specify a function to invoke after all parallel.Futures complete|
|Retrieve all output arguments from Future|
|Retrieve next available unread FevalFuture outputs|
|Cancel queued or running future|
|True if futures have same ID|
|Wait for futures to complete|
|Request function execution on parallel pool workers or MATLAB client|
|Parallel pool of workers|
|Class that enables sending and listening for data between client and workers|
|Class that enables sending and polling for data between client and workers|