Results 1 -
7 of
7
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
Shared Memory Multiprocessor Support for SAC
- Journal of Functional Programming
, 1999
"... . Sac (Single Assignment C) is a strict, purely functional programming language primarily designed with numerical applications in mind. Particular emphasis is on efficient support for arrays both in terms of language expressiveness and in terms of runtime performance. Array operations in Sac are bas ..."
Abstract
-
Cited by 14 (9 self)
- Add to MetaCart
. Sac (Single Assignment C) is a strict, purely functional programming language primarily designed with numerical applications in mind. Particular emphasis is on efficient support for arrays both in terms of language expressiveness and in terms of runtime performance. Array operations in Sac are based on elementwise specifications using so-called With-loops. These language constructs are also well-suited for concurrent execution on multiprocessor systems. This paper outlines an implicit approach to compile Sac programs for multi-threaded execution on shared memory architectures. Besides the basic compilation scheme, a brief overview of the runtime system is given. Finally, preliminary performance figures demonstrate that this approach is well-suited to achieve almost linear speedups. 1 Introduction Sac (Single Assignment C) is a strict, first-order, purely functional programming language primarily designed with numerical applications in mind. Particular emphasis is on efficient suppo...
On Defining Application-Specific High-Level Array Operations by Means of Shape-Invariant Programming Facilities
- Proceedings of the Array Processing Language Conference 98
, 1998
"... Most of the existing high-level array processing languages support a fixed set of pre-defined array operations and a few higher-order functions for constructing new array operations from existing ones. In this paper, we discuss a more general approach made feasible by Sac (for Single Assignement C), ..."
Abstract
-
Cited by 11 (3 self)
- Add to MetaCart
Most of the existing high-level array processing languages support a fixed set of pre-defined array operations and a few higher-order functions for constructing new array operations from existing ones. In this paper, we discuss a more general approach made feasible by Sac (for Single Assignement C), a functional variant of C. Sac provides a meta-level language construct called with- loop which may be considered a sophisticated variant of the forall-loops in HPF or of array comprehensions in functional languages. It allows for the element-wise specification of high-level operations on arrays of any dimensionality: any set of high-level array operations can be specified by means of with-loops and be made available in a library. This does not only improve the flexibility of specifications, but also simplifies the compilation process. By means of a few examples it is shown that the highlevel operations that are typically available in array processing languages such as Apl or Fortran90 ...
On Programming Scientific Applications in SAC - a Functional Language Extended by a Subsystem for High-Level Array Operations
- Proceedings of the 8th International Workshop on the Implementation of Functional Languages (IFL '96
, 1996
"... . This paper discusses some of the pros and cons of extending a simple functional language called Sac (for Single Assignment C) by array operations similar to those that are available in Apl. The array operations in Sac are based on the /-calculus, an algebra of arrays which provides a formalism for ..."
Abstract
-
Cited by 10 (4 self)
- Add to MetaCart
. This paper discusses some of the pros and cons of extending a simple functional language called Sac (for Single Assignment C) by array operations similar to those that are available in Apl. The array operations in Sac are based on the /-calculus, an algebra of arrays which provides a formalism for specifying and simplifying array operations in terms of index set manipulations. The programming techniques made possible by Sac are demonstrated by means of a functional program for the approximation of numerical solutions of partial differential equations by multigrid relaxation. This application is not only of practical relevance but also fully exposes the flavors of using high-level array operations. In contrast to specifications in other languages, e.g. in Fortran or Sisal, the Sac program is well structured, reasonably concise, and - what is most important - invariant against dimensionalities and shapes. However, sophisticated compilation techniques are necessary to avoid, whenever po...
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%.
HPF vs. SAC - a Case Study
- Proceedings of the 6th European Conference on Parallel Processing (Euro-Par’00
, 2000
"... . This paper compares the functional programming language Sac to Hpf with respect to specicational elegance and runtime performance. A well-known benchmark, red-black successive over-relaxation, serves as a case study. After presenting the Hpf reference implementation alternative Sac implementat ..."
Abstract
-
Cited by 8 (3 self)
- Add to MetaCart
. This paper compares the functional programming language Sac to Hpf with respect to specicational elegance and runtime performance. A well-known benchmark, red-black successive over-relaxation, serves as a case study. After presenting the Hpf reference implementation alternative Sac implementations are discussed. Eventually, performance gures show the ability to compile highly generic Sac specications into machine code that outperforms the Hpf implementation on a shared memory multiprocessor. 1 Introduction Programming language design basically is about nding the best possible tradeo between support for high-level program specications and runtime eciency. In the context of array processing, data parallel languages are well-suited to meet this goal. Replacing loop nestings by language constructs that operate on entire arrays rather than on single elements, not only improves program specications; it also creates new optimization opportunities for compilers [3, 4, 1, 8, 7...
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.

