Abstract
Parallel programming, whether imperative or functional, has long focused on arrays as the central data type. Meanwhile, typed functional programming has explored a variety of data types, including lists and various forms of trees.
Generic
functional programming decomposes these data types into a small set of fundamental building blocks: sum, product, composition, and their associated identities. Definitions over these few fundamental type constructions then automatically assemble into algorithms for an infinite variety of data types—some familiar and some new. This paper presents generic functional formulations for two important and well-known classes of parallel algorithms: parallel scan (generalized prefix sum) and fast Fourier transform (FFT). Notably, arrays play no role in these formulations. Consequent benefits include a simpler and more compositional style, much use of common algebraic patterns and freedom from possibility of run-time indexing errors. The functional generic style also clearly reveals deep commonality among what otherwise appear to be quite different algorithms. Instantiating the generic formulations, two well-known algorithms for each of parallel scan and FFT naturally emerge, as well as two possibly new algorithms.
Publisher
Association for Computing Machinery (ACM)
Subject
Safety, Risk, Reliability and Quality,Software
Cited by
7 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Rank-Polymorphism for Shape-Guided Blocking;Proceedings of the 11th ACM SIGPLAN International Workshop on Functional High-Performance and Numerical Computing;2023-08-30
2. A Generalized Parallel Prefix Sums Algorithm for Arbitrary Size Arrays;Parallel Processing and Applied Mathematics;2023
3. Artificial Intelligence Enterprise Management Using Deep Learning;Computational Intelligence and Neuroscience;2022-06-17
4. Parallel scan as a multidimensional array problem;Proceedings of the 8th ACM SIGPLAN International Workshop on Libraries, Languages and Compilers for Array Programming;2022-06-13
5. Generating Work Efficient Scan Implementations for GPUs the Functional Way;Euro-Par 2022: Parallel Processing;2022