arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1910.02375cs.PLcs.CL
收藏

循环转换语用的设计与使用

Design and Use of Loop-Transformation Pragmas

Argonne National Laboratory(阿贡国家实验室)

Michael Kruse, Hal Finkel

摘要:

在源代码中添加一个pragma指令可能比重写它更容易,例如循环展开。此外,如果应用程序是为多个平台维护的,那么它们在性能特征上的差异可能需要不同的代码转换。代码转换指令允许根据平台替换指令,即分离代码语义及其性能优化。在本文中,我们探讨了设计空间(语法和语义)添加到未来的OpenMP规范这样的指令。使用Clang中的原型实现,我们在一些基准测试中证明了这些指令的有用性。

英文摘要:

Adding a pragma directive into the source code is arguably easier than rewriting it, for instance for loop unrolling. Moreover, if the application is maintained for multiple platforms, their difference in performance characteristics may require different code transformations. Code transformation directives allow replacing the directives depending on the platform, i.e. separation of code semantics and its performance optimization. In this paper, we explore the design space (syntax and semantics) of adding such directive into a future OpenMP specification. Using a prototype implementation in Clang, we demonstrate the usefulness of such directives on a few benchmarks.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑