A template is a description of a general algorithm rather than the
executable object code or the source code more commonly found in
a conventional software library [5].
Templates may be customized by
the user - for example, they can be configured for the specific
data structure of a problem or for the specific computing system
on which the problem is to run. Templates are written in
a language-independent Algol-like structure, which is readily
translatable into a target language such as Fortran or C.
A collection of templates focusing on iterative methods for
solving large sparse linear systems is available from Netlib
.
For each template, the following is provided: a mathematical
description of the flow of the iteration; discussion of convergence
and stopping criteria; suggestions for applying a method to
special matrix types (e.g., banded systems); advice for
tuning (for example, which preconditioners are applicable and
which are not); tips on parallel implementations; and hints as
to when to use a method, and why.
A program archetype is (a) a program design strategy appropriate for a
restricted class of problems, and (b) a collection of program designs with
(c) implementations of exemplar problems in one or more programming
languages and optimized for a collection of target machines. The program
design strategy includes archetype-specific information about methods
of deriving a program from a specification, methods of parallelizing
sequential programs, the program structure, methods of reasoning about
correctness and performance, empirical data on performance
measurements and tuning for different kinds of machines, and
suggestions for test suites. A project at Caltech
is exploring the question of whether a library of parallel program
archetypes be used to reduce the effort required to produce correct
efficient programs
.