OpenMP 4.5 发布,多核编程框架

来源:开源中国社区 作者:oschina
  
OpenMP 4.5 发布了,OpenMP是由OpenMP Architecture Review Board牵头提出的,并已被广泛接受的,用于共享内存并行系统的多线程程序设计的一套编译指令 (Compiler Directive)。OpenMP支持的编程语言包括C语言、C++和Fortran;而支持OpenMP的编译器包括Sun Compiler,GNU Compiler和Intel Compiler等。OpenMP提供了对并行算法的高层的抽象描述,程序员通过在源代码中加入专用的pragma来指明自己的意图,由此编译器可以自动 将程序进行并行化,并在必要之处加入同步互斥以及通信。当选择忽略这些pragma,或者编译器不支持OpenMP 时,程序又可退化为通常的程序(一般为串行),代码仍然可以正常运作,只是不能利用多线程来加速程序执行。

更新日志:

  • The improvement of Fortran 2003 support.

  • The hint clause on critical construct and new hinted lock API routines were added to allow applications to inform the runtime about contention and desirability of speculation.

  • The if clause has been extended so that when using combined and composite constructs it is now possible to specify to which construct(s) the if clause applies, and it is possible to specify different if clauses for different constructs from which the combined or composite construct is composed.

  • In #pragma omp declare simd directive’s linear clauses it is now possible to specify through val, uval and ref modifiers whether references are linear, or whether the referenced variable values are linear.

  • Query functions for thread affinity have been added.

  • And in reality, OpenMP 4.5 also contains various other smaller changes, clarifications and bug fixes, too many to list them all, but this is a summary of some of those that are more notable.

如需了解更新详情,请点击这里


时间:2016-03-27 10:17 来源:开源中国社区 作者:oschina 原文链接

好文,顶一下
(1)
100%
文章真差,踩一下
(0)
0%
------分隔线----------------------------


把开源带在你的身边-精美linux小纪念品
无觅相关文章插件,快速提升流量