- 1、本文档共24页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
OpenMP Programming OpenMP Introduction OpenMP-Open Multi-Processing OpenMP is an Application Program Interface (API) Comprised of three components: Compiler directives Runtime library routines(运行库例程) Environment variables OpenMP program A program that consists of a base program, annotated with OpenMP directives and runtime library routines. base program A program written in a programming language. Three components of OpenMP Directives/pragmas Create threads Share the work amongst threads Synchronize threads Library routines external functions(外部功能) Control and query the parallel execution environment(控制和查询并行执行环境) Environment variables control the behavior of an OpenMP program Directives specifying how a compiler or assembler should process its input OpenMP directives for C/C++ are specified with the pragma preprocessing directive #pragma omp directive-name [clause[ [,] clause]...] new-line #pragma omp parallel #pragma omp for #pragma omp parallel for #pragma omp barrier Create threads/Share the work amongst threads/Synchronize threads Runtime Library a header file named omp.h omp_set_num_threads, omp_get_num_threads omp_get_max_threads, omp_get_thread_num omp_get_num_procs, omp_in_parallel omp_set_dynamic, omp_get_dynamic omp_set_nested, omp_get_nested omp_set_schedule, omp_get_schedule omp_get_thread_limit omp_set_max_active_levels omp_get_max_active_levels omp_get_level, omp_get_ancestor_thread_num omp_get_team_size, omp_get_active_level omp_in_final external functions/Control and query the parallel execution environment environment variables:control the behavior of an OpenMP program OMP_NUM_THREADS OMP_SCHEDULE OMP_DYNAMIC OMP_PROC_BIND OMP_NESTED OMP_STACKSIZE OMP_WAIT_POLICY OMP_MAX_ACTIVE_LEVELS OMP_THREAD_LIMIT The OpenMP Execution Model The OpenMP Memory Model parallel construct A set of implicit(隐含) tasks, one per thread, is generated. The code for each task is defined by the code inside the parallel construct. #pragma omp parallel [clause[ [, ]clau
您可能关注的文档
- ICS-Ch1-intro案例.pptx
- 2车床结构及维护和保养案例.ppt
- ICU评分系统案例.pptx
- 2车辆类型及编码规则案例.ppt
- 1.青岛版小学六年级上册分数乘法案例.ppt
- IDDQ测试原理及方法案例.docx
- IgG抗体分子结构案例.pptx
- 第四章脂质6-2014概论.ppt
- iMC7.1智能管理平台操作手册案例.docx
- 风机基础知识专题培训概论.ppt
- 中国多次直拉单晶炉行业市场占有率及投资前景预测分析报告.pdf
- 中国多功能阀门行业市场占有率及投资前景预测分析报告.pdf
- 中国多工位直接成衣打印机行业市场占有率及投资前景预测分析报告.pdf
- 部编版九年级下册语文详细教学计划及教学进度安排.docx
- 宁夏吴忠市同心县四校2024-2025学年高一上学期期末联考试地理试题(解析版).docx
- 中国多点平均温度计行业市场占有率及投资前景预测分析报告.pdf
- 2024年重庆市高考物理试题含答案解析.docx
- 2024年天津市高考政治试题含答案解析.docx
- 2024年天津市高考物理试题含答案解析.docx
- 中国多弹簧泥浆密封行业市场占有率及投资前景预测分析报告.pdf
最近下载
- 井下作业监督题库.doc VIP
- 【江苏卷】江苏省省扬州市2024-2025学年高三第一(上)学期期末检测(1.15-1.17)【地理试卷】含答案解析.pdf
- 欧洲家用电器市场调研和分析报告(2022年1月英文版).pdf
- DeepSeek从入门到精通(100页).pdf
- 教科版科学四年级下册第三单元 岩石与土壤 大单元整体教学设计学历案教案附作业设计(基于新课标教学评一体化).docx
- 湘方言语音特点与民俗文化关联分析.pptx VIP
- 核能安全控制系统系列:GE-Hitachi Safety Control System_(3).安全控制系统的架构与设计.docx
- 管理学-PPT课件(全).pptx
- AI技术在中学语文课堂互动中的应用教学研究课题报告.docx
- 五月的鲜花课件李皖.pptx
文档评论(0)