第五章并行程序设计的一般过程.pptVIP

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
  4. 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
  5. 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们
  6. 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
  7. 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
第五章并行程序设计的一般过程

第五章 并行程序设计的 一般方法 ;Creating a Parallel Program;几个术语( Terminology);Identifying portions of the work that can be Identifying portions of the work that can be performed concurrently performed concurrently Mapping the concurrent pieces of work onto multiple processes running in parallel Distributing the input, output, and intermediate associated with the problem data Managing accesses to data shared by multiple processors. Synchronizing the processors at various stages of the parallel program execution.;Steps for Creating a Parallel Program;并行算法设计一般过程 ;划分;Decomposition基本概念;Exploit potential concurrency Minimize inter-process communication Exploit potential concurrency, limit sizes of processes;进程间通信开销;Assignment;划分技术 ;Recursive Decomposition ; Example 1 ;Example 2; 1. procedure SERIAL_MIN (A, n) 2. begin 3. min = A[0]; 4. for i := 1 to n ? 1 do 5. if (A[i] min) min := A[i]; 6. endfor; 7. return min; 8. end SERIAL_MIN; 1. procedure RECURSIVE_MIN (A, n) 2. begin 3. if ( n = 1 ) then 4. min := A [0] ; 5. else 6. lmin := RECURSIVE_MIN ( A, n/2 ); 7. rmin := RECURSIVE_MIN ( (A[n/2]), n - n/2 ); 8. if (lmin rmin) then 9. min := lmin; 10. else 11. min := rmin; 12. endelse; 13. endelse; 14. return min; 15. end RECURSIVE_MIN;例1:;树的仿真模型如下图所示,设Tree0为一条长为L0的直线段,在Tree0的中点和三等分点以一定角度延伸出L0/2或L0/3长的线段,从而得到Tree1。将Tree1的各分支做同样的变换得到Tree2,以此类推,直到得到一棵完整的树Tn,其中n为树的仿真精度,即迭代次数。;树的仿真任务图;Data Decomposition ;Output Data Decomposition ;Example ;Input Data Partitioning ;Example ;Intermediate Data Partitioning ;例: 数值计算中,矩阵运算经常会用到划分 按行划分 主要划分方法 按列划分 划分为子矩阵;Perimeter to Area comm-to-comp ratio (area to volume in 3-d) Depends on n,p: decreases with n, increases with p;在地图上求最短路径;例:用牛顿法求f(x)=0的根。;Master; 例:交通信息服务网格 地图查询服务 按功能划分 路况展示服务 出行方案服务; commonly used in search space exploration unlike the data decomposition, the search space is not known beforehand computation can terminate

文档评论(0)

junjun37473 + 关注
实名认证
文档贡献者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档