main content

asynchronous parallel programming -凯发k8网页登录

evaluate functions in the background using 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

run function 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 ticbytes
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
run function after each function finishes running in the background
run function after all functions finish running in the background
retrieve results from function running in the background
retrieve next unread outputs from future array
stop function running in the background
cancel all jobs or tasks
wait for futures to complete
function scheduled to run
parallel pool of workers
send and listen for data between client and workers
send and poll data between client and workers

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 a dataqueue 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 as parfor and parfeval.

网站地图