next up previous contents
Next: Regression test utility Up: Tools Previous: Tools   Contents

Fortran Code Generation

A simple tool for generating a solver written in Fortran, from the data returned by the optimizer was built. The tool reads the structure of the system, the ordering of rows and columns, the sequence of Givens rotations applied to solve the system, and generates Fortran code that does just this.

The Fortran routine uses the algorithm described in [MC] section 5.1.8 and 5.1.9. The back-substitution that is finally applied should be trivial.

The fact, that the subroutine takes an unordered system as argument, and returns a $x$ vector corresponding to this system (so that the optimized solver can directly replace any previously used solver with no change of the main program) makes the generated code virtually unreadable. This suggests use of the test utility to verify the correctness of the code.

The code generator generates unrolled code. It is fairly trivial, and will probably work best on cache architectures, since no effort has been put into making the code behave well on deep pipelined architectures. Some effort could be put into making the code generator optimize the code for either cache or vector architectures. This would probably not be too difficult, yet it remains as an exercise for the end user.


next up previous contents
Next: Regression test utility Up: Tools Previous: Tools   Contents

1999-02-23