Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
Generative Programming and GMCL
[go: Go Back, main page]

Generative Matrix Computation Library:

A Case Study in Generative Programming

Generative Programming (GP) is about designing and implementing software modules which can be combined to generate specialized and highly optimized systems fulfilling specific requirements [Eis97]. The goals are to (a) decrease the conceptual gap between program code and domain concepts (known as achieving high intentionality), (b) achieve high reusability and adaptability, (c) simplify managing many variants of a component, and (d) increase efficiency (both in space and execution time) [CEG+98].
To meet these goals, GP deploys several principles [CEG+98]:

Generative Programming integrates aspects of many approaches such as Metaprogramming, Generic Programming, Object-Oriented Programming, Aspect-Oriented Programming, and Domain Engineering.

The Generative Matrix Computation Library (GMCL) represents a comprehensive and extensively documented case study in Generative Programming. The GMCL makes widespread use of expression templates, generative C++ programming idioms, and many template metaprogramming facilities, e.g. control structures for static metaprogramming. The C++ implementation of the matrix component comprises 7500 lines of C++ code. The matrix configuration DSL covers more than 1840 different kinds of matrices (i.e. with different combinations of features such as dense or sparse, different shapes, different storage formats, dynamic or static memory allocation, different error checking strategies, etc.). Despite the large number of provided matrix variants, the performance of the generated code is comparable with the performance of manually coded variants. This is achieved by the exclusive use of static binding, which is often combined with inlining.

People involved in the GMCL project include Krzysztof Czarnecki, Ulrich Eisenecker, Johannes Knaupp, and Tobias Neubert (past member). This work has been supported in part by Daimler-Benz AG and the German Federal Ministry of Education, Science, Research and Technology (BMBF) through the OSVA project.
 

Documentation and Sources

The above three documents represent three chapters from
K. Czarnecki. Generative Programming: Principles and Techniques of Software Engineering Based on Automated Configuration and Fragment-Based Component Models. Ph.D. thesis, Technische Universität Ilmenau, Germany, 1998.
This material will be also published in the upcoming book K. Czarnecki and U. Eisenecker. Generative Programming: Methods, Techniques, and Applications. Addison-Wesley, to appear in 1999.
  Please send your comments to czarnecki@acm.org

Related links

You may also want to take a look at the extensive list of references and web links on Generative Programming.
 

References

[CEG+98] K. Czarnecki, U. Eisenecker, R. Glück, D. Vandevoorde, and T. Veldhuizen. Generative Programming and Active libraries. Draft submitted for publication, 1998

[Eis97] U. Eisenecker. Generative Programming (GP) with C++. In Proceedings of Modular Programming Languages (JMLC’97, Linz, Austria, March 1997), H. Mössenböck, (Ed.), Springer-Verlag, Heidelberg 1997, pp. 351-365, see http://home.t-online.de/home/Ulrich.Eisenecker/