Results 1 -
6 of
6
Single Assignment C -- efficient support for high-level array operations in a functional setting
, 2003
"... ..."
Single Assignment C - Functional Programming Using Imperative Style
- In John Glauert (Ed.): Proceedings of the 6th International Workshop on the Implementation of Functional Languages. University of East Anglia
, 1994
"... This paper proposes a new functional programming language called Sac (Single Assignment C) which tries to combine the best of two worlds: the efficiency and portability of C (or Fortran) and the concurrency deducable from the functional paradigm. The major objectives in the design of Sac comprise s ..."
Abstract
-
Cited by 18 (4 self)
- Add to MetaCart
This paper proposes a new functional programming language called Sac (Single Assignment C) which tries to combine the best of two worlds: the efficiency and portability of C (or Fortran) and the concurrency deducable from the functional paradigm. The major objectives in the design of Sac comprise support for high performance concurrent scientific applications (number crunching), a module concept which allows for the integration of non-funtional components, and a syntax as close as possible to C. 1 Introduction Functional programming languages did not yet find a broad acceptance by application programmers outside the functional community. The reasons for this situation are manifold and differ depending on the field of application. Of primary interest in this paper are scientific applications involving complex manipulations of arrays. For this class of applications the following criteria are the most important ones for the choice of a suitable language: ffl availability of primitive a...
With-loop-folding in SAC — Condensing Consecutive Array Operations
- Proceedings of the 9th International Workshop on Implementation of Functional Languages (IFL’97
, 1998
"... Abstract. This paper introduces a new compiler optimization called with-loop-folding. It is based on a special loop construct, the withloop, which in the functional language Sac (for Single Assignment C) serves as a versatile vehicle to describe array operations on an elementwise basis. A general me ..."
Abstract
-
Cited by 16 (11 self)
- Add to MetaCart
Abstract. This paper introduces a new compiler optimization called with-loop-folding. It is based on a special loop construct, the withloop, which in the functional language Sac (for Single Assignment C) serves as a versatile vehicle to describe array operations on an elementwise basis. A general mechanism for combining two of these with-loops into a single loop construct is presented. This mechanism constitutes a powerful tool when it comes to generate efficiently executable code from high-level array specifications. By means of a few examples it is shown that even complex nestings of array operations similar to those available in Apl can be transformed into single loop operations which are similar to hand-optimized with-loop specifications. As a consequence, the way a complex array operation is combined from primitive array operations does not affect the runtime performance of the compiled code, i.e., the programmer is liberated from the burden to take performance considerations into account when specifying complex array operations. 1
A case study: Effects of WITH-loop-folding on the NAS Benchmark MG in SAC
- Proceedings of IFL `98, LNCS 1595
, 1999
"... Sac is a functional C variant with efficient support for high-level array operations. This paper investigates the applicability of a Sac specific optimization technique called with-loop-folding to real world applications. As an example program which originates from the Numerical Aerodynamic Simula ..."
Abstract
-
Cited by 10 (6 self)
- Add to MetaCart
Sac is a functional C variant with efficient support for high-level array operations. This paper investigates the applicability of a Sac specific optimization technique called with-loop-folding to real world applications. As an example program which originates from the Numerical Aerodynamic Simulation (NAS) Program developed at NASA Ames Research Center, the so-called NAS benchmark MG is chosen. It comprises a kernel from the NAS Program which implements 3-dimensional multigrid relaxation. Several run-time measurements exploit two different benefits of with-loop-folding: First, an overall speed-up of about 20 % can be observed. Second, a comparison between the run-times of a hand-optimized specification and of Apl-like specifications yields identical run-times, although a naive compilation that does not apply with-loop-folding leads to slowdowns of more than an order of magnitude. Furthermore, With-loop-folding makes a slight variation of the algorithm feasible which substantially simplifies the program specification and requires less memory during execution. Finally, the optimized run-times are compared against run-times gained from the original Fortran program, which shows that for different problem sizes, the code generated from the Sac program does not only reach the execution times of the code generated from the Fortran program but even outperforms them by about 10%.
On Code Generation for Multi-Generator With-Loops in SaC
- In: P.Koopman and C. Clack: Proceedings of IFL’99 (selected Papers), LNCS 1868
, 2000
"... Abstract. Most array operations in Sac are specified in terms of socalled with-loops, a Sac-specific form of array comprehension. Due to the map-like semantics of with-loops its loop instances can be computed in any order which provides considerable freedom when it comes to compiling them into nesti ..."
Abstract
-
Cited by 4 (2 self)
- Add to MetaCart
Abstract. Most array operations in Sac are specified in terms of socalled with-loops, a Sac-specific form of array comprehension. Due to the map-like semantics of with-loops its loop instances can be computed in any order which provides considerable freedom when it comes to compiling them into nestings of for-loops in C. This paper discusses several different execution orders and their impact on compilation complexity, size of generated code, and execution runtimes. As a result, a multiply parameterized compilation scheme is proposed which achieves speedups of up to a factor of 16 when compared against a nai"ve compilation scheme. 1 Introduction Sac is a functional C-variant that is particularly aimed at numerical applications involving complex array operations. To allow for a fairly high level of abstraction, Sac supports so-called shape-invariant programming, i.e., all operations/functions can be defined in a way that allows array arguments to have arbitrary extents in an arbitrary number of dimensions. The main language construct for specifying such array operations is the so-called with-loop, a form of array comprehension adjusted to the needs of shape-invariant programming. In [20] it has been shown that the array concept of Sac is suitable for specifying reasonably complex array operations in a shape-invariant style. It has also been shown that such specifications can be compiled into code whose runtimes are competitive with those obtained from rather low-level specifications in other languages such as Sisal or Fortran.
Generic Programming on the Structure of Homogeneously Nested Arrays
"... In this paper we propose a new means to model and operate on nested arrays that allows for a high level of abstraction without introducing a performance penalty. We achieve this by using a nesting structure on array types which allows us to shift the nesting information of arrays from the runtime re ..."
Abstract
- Add to MetaCart
In this paper we propose a new means to model and operate on nested arrays that allows for a high level of abstraction without introducing a performance penalty. We achieve this by using a nesting structure on array types which allows us to shift the nesting information of arrays from the runtime representation level to the type system level. This information can then be exploited for generic function definitions on the nesting structure of arrays which, as we show, neatly integrates with subtyping based function overloading. Finally, we demonstrate for an example how nested arrays and generic function definitions can be fully stripped out using existing optimisation techniques. 1

