OoLaLa: how and when can it be optimised?

  • Authors:
  • Mikel Luján;T. L. Freeman;John R. Gurd

  • Affiliations:
  • Centre for Novel Computing, Department of Computer Science, University of Manchester, Manchester, UK;University of Manchester, Manchester, United Kingdom;University of Manchester, Manchester, United Kingdom

  • Venue:
  • JGI '02 Proceedings of the 2002 joint ACM-ISCOPE conference on Java Grande
  • Year:
  • 2002

Quantified Score

Hi-index 0.00

Visualization

Abstract

OoLaLa is an object oriented linear algebra library designed to reduce development and maintenance effort [2]. In contrast with traditional (Fortran-based) libraries, it provides two high abstraction levels that significantly reduce the combinatorial number of implementations necessary for particular linear algebra operations. Traditional libraries sacrifice abstraction for performance and their implementations of matrix operations have embedded knowledge about the data structures, storage formats (SFs), and special characteristics, matrix properties (MPs). These implementations are said to be at Storage Format Abstraction level (SFA-level). The first higher abstraction level, Matrix Abstraction level (MA-level), provides indexed random access to matrix elements. The second higher abstraction level, Iterator Abstraction level (IA-level), is based on the iterator pattern and provides sequential access to nonzero matrix elements.Performance results of a Java version of OoLaLa show that MA-level and IA-level are not competitive with SFA-level and motivate the two questions addressed in this poster: (1) how can implementations at MA-level and IA-level be transformed into the more efficient SFA-level? and (2) for which sets of SFs and MPs can this be done automatically?The latter question is addressed by the definition of a subset of MPs, linear combination matrix property (LCMP), and a subset of SFs, constant time element access storage format (CTSF). The set LCMP is defined as the subset of MPs such that every MP is based on a boolean expression involving linear combinations of the indices i and j to determine whether an element aij might be a nonzero element. An example of a LCMP is the upper triangular property (i.e. aij is zero when iρj). The set CTSF is defined as the subset of SFs such that matrix elements can be accessed in constant time. An example of an CTSF is the dense format; i.e. a two-dimensional array. The former question is tackled by a sequence of standard compiler transformations which is as follows: (1) method inlining, (2) move the guards1 for the inlined methods to surround the loop (or loops) and include nullity test for every object, (3) remove try-catch and throw clauses, (4) make local copies of the accessed attributes (class and instance variables), (5) disambiguate aliases, (6) remove redundant computations, and (7) transform while-loops into for-loops. Note that outside the scope of this work are loop restructuring transformations for the generation of block or recursive code. This sequence is not only beneficial for OoLaLa, but also for other libraries based on arrays (e.g. the JSR-0832 Array-List, Hash-Map and Hash-Set). Further information can be found in [1].