RESEARCH ARTICLE Generic Support of Algorithmic and Structural Recursion for Scientific Computing
Peter Gottschling, David S. Wise, Adwait Joshi · 2008
Recursive algorithms, like quick-sort, and recursive data structures, like trees, play a central role in programming. In the context of scientific computing, recursive algorithms and memory layouts are shown here to provide excellent cache and TLB locality independently of the platform. We show how, for the first time, generic programming (GP) and object-oriented programming (OOP) allow us to abstract a multitude of dense-matrix memory layouts: from conventional row-major and column-major layouts over Z- and I-Morton orders to blockwise combinations of them. All are provided by a single class that is based on our new matrix