This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Memoryoptimal evaluation of expression trees involving large objects ChiChung Lam a,1 , Thomas Rauber b , Gerald Baumgartner c, , Daniel Cociorva a,2 , P. Sadayappan a a Department of Computer Science and Engineering, The Ohio State University, Columbus, OH 43210, USA b University of Bayreuth, Lehrstuhl fur Angewandte Informatik II, D95447 Bayreuth, Germany c Department of Computer Science, Louisiana State University, Baton Rouge, LA 70803, USA Abstract The need to evaluate expression trees involving large objects arises in scientific computing ap plications such as electronic structure calculations. Often, the tree node objects are so large that only a subset of them can fit into memory at a time. This paper addresses the problem of finding an evaluation order of the nodes in a given expression tree that uses the least amount of mem ory. We present an algorithm that finds an optimal evaluation order in ( n log 2 n ) time for an nnode expression tree and prove its correctness. We demonstrate the utility of our algorithm using representative equations from quantum chemistry. Keywords: expression tree, evaluation order, memory minimization, register allocation 1. Introduction This paper addresses the problem of finding an evaluation order of the nodes in a given expression tree that minimizes memory usage. The expression tree must be evaluated in some bottomup order, i.e., the evaluation of a node cannot precede the evaluation of any of its children. The nodes of the expression tree are large data objects whose sizes are given. If the total size of the data objects is so large that they cannot all fit into memory at the same time, space for the data objects has to be allocated and deallocated dynamically. Due to the parentchild dependence relation, a data object cannot be deallocated until its parent node data object has been evaluated. The objective is to minimize the maximum memory usage during the evaluation of the entire expression tree. This problem arises, for example, in the accurate modeling of the electronic structure of atoms and molecules in quantum chemistry [1, 2] as well as in some computational physics codes modeling the electronic properties of semiconductors and metals [3, 4, 5]. Computational approaches to modeling the structure and interactions of molecules, the electronic and optical This work was supported in part by the National Science Foundation under grants DMR9520319, CHE0121676, CNS0509467, and CCF0541409. Corresponding author. Tel.: + 1 225 578 2191; fax: + 1 225 578 1465. 1 Current address: Chemical Abstracts Service, Columbus, OH 43210, USA. 2 Current address: Department of Chemical Physiology, The Scripps Research Institute, La Jolla, CA 92037, USA....
View
Full
Document
This note was uploaded on 12/31/2011 for the course CSC 4351 taught by Professor Baumgartner,g during the Fall '08 term at LSU.
 Fall '08
 Baumgartner,G
 Computer Science

Click to edit the document details