Optimal Cache-Oblivious Mesh Layouts
Abstract
A mesh is a graph that divides physical space into regularly-shaped regions. Meshes computations form the basis of many applications, e.g. finite-element methods, image rendering, and collision detection. In one important mesh primitive, called a mesh update, each mesh vertex stores a value and repeatedly updates this value based on the values stored in all neighboring vertices. The performance of a mesh update depends on the layout of the mesh in memory. This paper shows how to find a memory layout that guarantees that the mesh update has asymptotically optimal memory performance for any set of memory parameters. Such a memory layout is called cache-oblivious. Formally, for a -dimensional mesh , block size , and cache size (where ), the mesh update of uses memory transfers. The paper also shows how the mesh-update performance degrades for smaller caches, where . The paper then gives two algorithms for finding cache-oblivious mesh layouts. The first layout algorithm runs in time both in expectation and with high probability on a RAM. It uses memory transfers in expectation and memory transfers with high probability in the cache-oblivious and disk-access machine (DAM) models. The layout is obtained by finding a fully balanced decomposition tree of and then performing an in-order traversal of the leaves of the tree. The second algorithm runs faster by almost a factor in all three memory models, both in expectation and with high probability. The layout obtained by finding a relax-balanced decomposition tree of and then performing an in-order traversal of the leaves of the tree.
Keywords
Cite
@article{arxiv.0705.1033,
title = {Optimal Cache-Oblivious Mesh Layouts},
author = {Michael A. Bender and Bradley C. Kuszmaul and Shang-Hua Teng and Kebin Wang},
journal= {arXiv preprint arXiv:0705.1033},
year = {2009}
}