asynchronous parallel programming -凯发k8网页登录
parfeval
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 or . this can be useful if
you want to be able to plot intermediate results. note that this is
different from using parfor
,
where you have to wait for the loop to complete.
use and together to send and poll for messages or data from different workers using a data queue. you can use to add a function to call when new data is received from a data queue.
use and to automatically invoke functions after each or after all elements of a array complete. this array can contain futures returned by , , or .
functions
topics
break out of a loop early and collect results as they become available.
this example shows how to query the state of
parfeval
futures and cancel them.automatically run functions after
future
objects finish running on parallel pools.- plot during parameter sweep with parfeval
this example shows how to perform a parallel parameter sweep with
parfeval
and send results back during computations with adataqueue
object. this example shows how to update a user interface as computations complete.
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.
- (deep learning toolbox)
this example shows how to run multiple deep learning experiments on your local machine.
- (deep learning toolbox)
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. compare and contrast
spmd
against other parallel computing functionality such asparfor
andparfeval
.