parforslice-创新互联

http

公司主营业务:成都网站设计、成都做网站、移动网站开发等业务。帮助企业客户真正实现互联网宣传,提高企业的竞争能力。创新互联建站是一支青春激扬、勤奋敬业、活力青春激扬、勤奋敬业、活力澎湃、和谐高效的团队。公司秉承以“开放、自由、严谨、自律”为核心的企业文化,感谢他们对我们的高要求,感谢他们从不同领域给我们带来的挑战,让我们激情的团队有机会用头脑与智慧不断的给客户带来惊喜。创新互联建站推出定边免费做网站回馈大家。://www.mathworks.cn/cn/help/distcomp/advanced-topics.html
PARFOR loops work by dividing the iterations of the loop among many
workers. Things work best when the inputs to the loop and outputs from
the loop can also be divided in the same way. The simplest example might
be:

N = 10;
in1 = rand(1, N);
in2 = rand(1, N);
out2 = 0;
parfor ii = 1:N
  out1(ii) = in1(ii) * 2 + max(in2);
  out2 = out2 + in1(ii);
end

In this case, both 'in1' and 'out1' are SLICED because PARFOR can see
how to divide them up - not all of 'in1' or 'out1' are required to
perform an iteration of the loop. 'in2' is *not* sliced, because the
whole value is needed for each loop iteration. 'out2' is not sliced
either, but PARFOR can still compute the value because it understands
that it is a REDUCTION variable. More info:



PARFOR warns you if you have a variable inside a PARFOR loop that you're
indexing, but that isn't sliced. This warning appears because you might
have intended the variable to be sliced, but PARFOR couldn't slice it.

PARFOR can slice multi-dimensional arrays providing that the indexing
expression matches various conditions layed out in the page referred to
above. For example:

in3 = rand(N);
parfor ii=1:N
  out3(:,ii) = 1 - in3(:,ii);
end

both 'in3' and 'out3' can be sliced.

Cheers,

Edric.parforslice
本文题目:parforslice-创新互联
网页链接:http://hxwzsj.com/article/diejei.html

其他资讯

Copyright © 2025 青羊区翔捷宏鑫字牌设计制作工作室(个体工商户) All Rights Reserved 蜀ICP备2025123194号-14
友情链接: 成都网站建设 成都网站建设公司 成都网站制作 阿坝网站设计 成都模版网站建设 攀枝花网站设计 成都商城网站建设 成都网站设计 手机网站制作设计 成都企业网站建设 成都响应式网站建设公司 成都网站制作 营销型网站建设 成都h5网站建设 品牌网站建设 手机网站制作 成都网站设计 成都网站制作 成都做网站建设公司 营销网站建设 外贸网站设计方案 网站制作