A Modular Iterative Solver Package in a Categorical Language

Iterative solvers based on Krylov subspace techniques form an important collection of tools for numerical linear algebra. The family of generic solvers is made up of a large number of slightly different algorithms with slightly different properties, which leads to redundancy when implementing them. To overcome this, we build the algorithms out of modular parts, which also makes the connections between the algorithms explicit. In addition to the design of this toolkit, we present here a summary of our initial investigations into automatic compiler optimisations of the code for the algorithms built from these parts. These optimisations are intended to mitigate the inefficiency introduced by modularity.