【24h】

Functional Array Fusion

机译:功能阵列融合

获取原文

摘要

This paper introduces a new approach to optimising array algorithms in functional languages. We are specifically aiming at an efficient implementation of irregular array algorithms that are hard to implement in conventional array languages such as Fortran. We optimise the storage layout of arrays containing complex data structures and reduce the running time of functions operating on these arrays by means of equational program transformations. In particular, this paper discusses a novel form of combinator loop fusion, which by removing intermediate structures optimises the use of the memory hierarchy. We identify a combinator named loopP that provides a general scheme for iterating over an array and that in conjunction with an array constructor replicateP is sufficient to express a wide range of array algorithms. On this basis, we define equational transformation rules that combine traversals of loopP and replicateP as well as sequences of applications of loopP into a single loopP traversal. Our approach naturally generalises to a parallel implementation and includes facilities for optimising load balancing and communication. A prototype implementation based on the rewrite rule pragma of the Glasgow Haskell Compiler is significantly faster than standard Haskell arrays and approaches the speed of hand coded C for simple examples.
机译:本文介绍了一种以功能语言优化阵列算法的新方法。我们专门针对不规则的阵列算法的有效实现,这些阵列算法很难以诸如Fortran的传统阵列语言实现。我们优化包含复杂数据结构的阵列的存储布局,并通过等式程序转换减少在这些阵列上运行的运行时间。特别地,本文讨论了一种新颖的组合循环融合形式,其通过去除中间结构优化存储器层级的使用。我们识别名为Loopp的组合器,该组合器提供了一种用于迭代阵列的一般方案,并且与数组构造函数replicatep结合可以表达各种阵列算法。在此基础上,我们定义了与Loopp和Replicatep的遍历以及Loopp的应用程序序列组合到单个Loopp遍历中的遍历。我们的方法自然地推广到平行实施,包括优化负载平衡和通信的设施。基于Glasgow Haskell编译器的重写规则Pragma的原型实现比标准Haskell阵列更快,并且对简单示例接近手编码C的速度。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号