[Python-Dev] FYI: Techniques for scientific C++
David Ascher
da@ski.org
Thu, 9 Sep 1999 23:28:07 -0700 (Pacific Daylight Time)
In case you haven't seen enough C++ papers, you might find this paper
interesting. It's a good way to learn more about templates without trying
to actually use them, and it's a very good way to decide to stay away from
high-power C++ techniques like expression templates. Yeeagh!
(I especially like the program shown in section 1.11.1).
--david
Date: Thu, 26 Aug 1999 21:59:06 -0500 (EST)
From: Todd Veldhuizen <tveldhui@extreme.indiana.edu>
Subject: OON: Techniques for scientific C++
I've updated and expanded my slides on "Techniques for Scientific C++"
into a document. It's available in HTML and Postscript from:
HTML: http://extreme.indiana.edu/~tveldhui/papers/techniques/
PS: http://extreme.indiana.edu/~tveldhui/papers/techniques/techniques.ps
Here's the table of contents.
1.1: About this document
1.2: C++ Compilers
1.2.1: Placating sub-standard compilers
1.2.2: The compiler landscape
1.2.3: C++-specific optimization
1.3: Compile times
1.3.1: Headers
1.3.2: Prelinking
1.3.3: The program database approach -- Visual Age C++
1.3.4: Quadratic/Cubic template algorithms
1.4: Static Polymorphism
1.4.1: Are virtual functions evil?
1.4.2: Solution A: simple engines
1.4.3: Solution B: the Barton and Nackman Trick
1.5: Callback inlining techniques
1.5.1: Callbacks: the typical C++ approach
1.5.1.1: Expression templates
1.5.1.2: STL-style function objects
1.5.1.3: Pointer-to-function as a template parameter
1.6: Managing code bloat
1.6.1: Avoid kitchen-sink template parameters
1.6.2: Put function bodies outside template classes
1.6.3: Inlining levels
1.7: Containers
1.7.1: STL-style containers
1.7.2: Data/View containers
1.8: Aliasing and restrict
1.9: Traits
1.9.1: An example: average()
1.9.2: Type promotion example
1.10: Expression templates
1.10.1: Performance implications of pairwise evaluation
1.10.2: Recursive templates
1.10.3: Expression templates: building parse trees
1.10.4: A minimal implementation
1.10.5: Refinements
1.10.6: Pointers to more information
1.10.7: References
1.11: Template metaprograms
1.11.1: Template metaprograms: some history
1.11.2: The need for specialized algorithms
1.11.3: Using template metaprograms to specialize algorithms
1.12: Comma overloading
1.12.1: An example
1.13: Interfacing with Fortran codes
1.14: Some thoughts on performance tuning
1.14.1: General suggestions
1.14.2: Know what your compiler can do
1.14.3: Data structures and algorithms
1.14.4: Efficient use of the memory hierarchy
Cheers,
Todd
- --
Todd Veldhuizen tveldhui@acm.org
Indiana Univ. Comp. Sci. http://extreme.indiana.edu/~tveldhui/
- --------------------- Object Oriented Numerics List --------------------------