parallel for-凯发k8网页登录
use parallel processing by running
parfor
on
workers in a parallel pool parallel computing toolbox™ supports interactive parallel
computing and enables you to accelerate your workflow by running on
multiple workers in a parallel pool. use parfor
to
execute for
-loop iterations in parallel on workers
in a parallel pool. when you have profiled your code and identified
slow for
-loops, try parfor
to
increase your throughput. develop parfor
-loops
on your desktop and scale up to a cluster without changing your code.
functions
topics
getting started with parfor
discover basic concepts of aparfor
-loop, and decide when to use it.
diagnose and fix commonparfor
problems.
unlike afor
-loop,parfor
-loop iterations have no guaranteed order.
learn how to deal with parallel nested loops.
discover variable requirements and classification inparfor
-loops.
running parfor
-loops
- interactively run loops in parallel using parfor
convert afor
-loop into a scalableparfor
-loop.
create arrays inside or outsideparfor
-loops to speed up code.
learn about starting and stopping parallel pools, pool size, and cluster selection.- specify your parallel preferences
specify your preferences, and automatically create a parallel pool.
discover how to use objects, handles, and sliced variables inparfor
-loops.
all references to variables inparfor
-loops must be visible in the body of the program.- scale up parfor-loops to cluster and cloud
developparfor
-loops on your desktop, and scale up to a cluster without changing your code.
you can useparfor
-loops to calculate cumulative values that are updated by each iteration.
control random number generation inparfor
-loops by assigning a particular substream for each iteration.
this example shows how to speed up monte-carlo code by usingparfor
-loops.
deep learning
- (deep learning toolbox)
this example shows how to use aparfor
loop to perform a parameter sweep on a training option.