1 / 10

传统排序算法的并行实现

同济大学. TONGJI UNIVERSITY. 传统排序算法的并行实现. 并行计算. openmp.

carr
Download Presentation

传统排序算法的并行实现

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 同济大学 TONGJI UNIVERSITY 传统排序算法的并行实现

  2. 并行计算

  3. openmp OpenMP(Open Multi-Processing)是由OpenMP Architecture Review Board牵头提出的,并已被广泛接受的,用于共享内存并行系统的多线程程序设计的一套指导性注释(Compiler Directive)。OpenMP支持的编程语言包括C语言、C++和Fortran;而支持OpenMP的编译器包括Sun Studio和Intel Compiler,以及开放源码的GCC和Open64编译器。OpenMP提供了对并行算法的高层的抽象描述,程序员通过在源代码中加入专用的pragma来指明自己的意图,由此编译器可以自动将程序进行并行化,并在必要之处加入同步互斥以及通信。

  4. openmp • #pragma omp parallel for • #pragma omp parallel if • #pragma omp parallel sections • #pragma omp parallel single • #pragma omp parallel master

  5. 传统的排序算法 冒泡排序 快速排序 归并排序

  6. 并行冒泡排序 奇偶排序

  7. 并行快速/归并排序

  8. 测试结果

  9. 同济大学 TONGJI UNIVERSITY 谢谢

More Related