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 set 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—such as Functor
, Applicative
, Foldable
, and Traversable
—and freedom from possibility of run-time indexing errors. The functional generic style also clearly reveals deep commonality among what otherwise appears to be quite different algorithms. Instantiating the generic formulations to "top-down" and "bottom-up" trees as well as "bushes", two well-known algorithms for each of parallel scan and FFT naturally emerge, as well as two possibly new algorithms.
Conal Elliott has been working (and playing) in functional programming for more than 35 years. He especially enjoys applying semantic elegance and rigor to library design and optimized implementation. He invented the paradigm now known as “functional reactive programming” in the early 1990s, and then pioneered compilation techniques for high-performance, high-level embedded domain-specific languages, with applications including 2D and 3D computer graphics. The latter work included the first compilation of Haskell programs to GPU code, while maintaining precise and simple semantics and powerful composability, as well a high degree of optimization. Conal earned a BA in math with honors from the College of Creative Studies at UC Santa Barbara in 1982 and a PhD in Computer Science from Carnegie Mellon University in 1990. He is currently working as distinguished scientist at Target. Previously, we worked at Tabula Inc on chip specification and compiling Haskell to hardware for massively parallel execution. Before Tabula, his positions included Architect at Sun Microsystems and Researcher in the Microsoft Research graphics group. He has also coached couples and led conscious relationship workshops together with his partner Holly Croydon, with whom he now lives on 20 acres in the woods in the California Gold Country.
Mon 4 SepDisplayed time zone: Belfast change
13:00 - 14:30 | Functional Programming TechniquesResearch Papers at L1 Chair(s): Graham Hutton University of Nottingham | ||
13:00 22mTalk | Faster Coroutine Pipelines Research Papers Mike Spivey University of Oxford, UK DOI | ||
13:22 22mTalk | A Pretty But Not Greedy Printer (Functional Pearl) Research Papers Jean-Philippe Bernardy University of Gothenburg DOI | ||
13:45 22mTalk | Generic Functional Parallel Algorithms: Scan and FFT Research Papers Conal Elliott Target, USA DOI | ||
14:07 22mTalk | A Unified Approach to Solving Seven Programming Problems (Functional Pearl) Research Papers William E. Byrd University of Utah, USA, Michael Ballantyne University of Utah, USA, Gregory Rosenblatt n.n., n.n., Matthew Might University of Utah, USA DOI |