SFCGen: A framework for efficient generation of multi-dimensional space-filling curves by recursion

Because they are continuous and self-similar, space-filling curves have been widely used in mathematics to transform multi-dimensional problems into one-dimensional forms. For scientific applications, reordering computation by certain space-filling curves can significantly improve data reuse because of the locality properties of these curves. However, when space-filling curves are used in programs for reordering data, traversal or indexing of the curves must be efficient. To address this problem, we present the table-driven framework SFCGen to efficiently generate multi-dimensional space-filling curves on the fly. The framework is general and easy enough to be used in any application that can be partitioned recursively in multiple dimensions. We describe a movement specification table, a universal turtle algorithm to enumerate points along a space-filling curve, a table-based indexing algorithm to transform coordinates of a point into its position along the curve and an algorithm to pregenerate the table automatically. As examples, we show how high-dimensional Hilbert, Morton, and Peano curves and a two-dimensional Sierpiński curve can be generated with our algorithms. We present performance results for Hilbert, Morton, and Peano curves and compare the efficiency of our curve generation algorithm with the most recent work on generating Hilbert curves. Our experimental results on three modern microprocessor-based platforms show that SFCGen performs up to 63&percent; faster than the most recent recursive algorithm on 2D curve generation and up to a factor of 132 faster than two previous byte-oriented non-recursive implementations. On curve indexing, SFCGen performs as much as a factor of three faster than the byte-oriented implementation. Our results on 4D space-filling curves also show that SFCGen scales very well with curve level for higher dimensional spaces.

[1]  A. Lindenmayer Mathematical models for cellular interactions in development. I. Filaments with one-sided inputs. , 1968, Journal of theoretical biology.

[2]  Christoph Schierz,et al.  Algorithm 781: generating Hilbert's space-filling curve by recursion , 1998, TOMS.

[3]  A. J. Cole,et al.  A note on space filling curves , 1983, Softw. Pract. Exp..

[4]  Jeremy D. Frens,et al.  Auto-blocking matrix-multiplication or tracking BLAS3 performance from source code , 1997, PPOPP '97.

[5]  Akhil Kumar A Study of Spatial Clustering techniques , 1994, DEXA.

[6]  Arthur R. Butz,et al.  Space Filling Curves and Mathematical Programming , 1968, Inf. Control..

[7]  Mary Shaw,et al.  A comparison of programming languages for software engineering , 1981, Softw. Pract. Exp..

[8]  Mithuna Thottethodi,et al.  Recursive array layouts and fast parallel matrix multiplication , 1999, SPAA '99.

[9]  John J. Bartholdi,et al.  Vertex‐labeling algorithms for the Hilbert spacefilling curve , 2001, Softw. Pract. Exp..

[10]  C. Alpert,et al.  Multi-Way Partitioning Via Spacefilling Curves and Dynamic Programming , 1994, 31st Design Automation Conference.

[11]  Robert E. Webber,et al.  Space diffusion: an improved parallel halftoning technique using space-filling curves , 1993, SIGGRAPH.

[12]  Walid G. Aref,et al.  Irregularity in multi-dimensional space-filling curves with applications in multimedia databases , 2001, CIKM '01.

[13]  Ken Kennedy,et al.  Improving memory hierarchy performance for irregular applications , 1999, ICS '99.

[14]  Christian Böhm,et al.  Searching in high-dimensional spaces: Index structures for improving the performance of multimedia databases , 2001, CSUR.

[15]  Baback Moghaddam,et al.  Space-filling curves for image compression , 1991, Defense, Security, and Sensing.

[16]  R. J. Stevens,et al.  Manipulation and Presentation of Multidimensional Image Data Using the Peano Scan , 1983, IEEE Transactions on Pattern Analysis and Machine Intelligence.

[17]  Arthur R. Butz,et al.  Convergence with Hilbert's Space Filling Curve , 1969, J. Comput. Syst. Sci..

[18]  Alan L. Cox,et al.  Improving Fine-Grained Irregular Shared-Memory Benchmarks by Data Reordering , 2000, ACM/IEEE SC 2000 Conference (SC'00).

[19]  H. V. Jagadish,et al.  Linear clustering of objects with multiple attributes , 1990, SIGMOD '90.

[20]  Luiz Velho,et al.  Digital halftoning with space filling curves , 1991, SIGGRAPH.

[21]  Yossi Matias,et al.  A Video Scrambling Technique Based On Space Filling Curves , 1987, CRYPTO.

[22]  H. Sagan A three-dimensional Hilbert curve , 1993 .

[23]  Peter J. H. King,et al.  Querying multi-dimensional data indexed using the Hilbert space-filling curve , 2001, SGMD.

[24]  Ken Musgrave A PEANO CURVE GENERATION ALGORITHM , 1991 .

[25]  Ernest F. Brickell,et al.  Cryptanalysis of Video Encryption Based on Space-Filling Curves , 1990, EUROCRYPT.

[26]  Walid G. Aref,et al.  Analysis of Multi-Dimensional Space-Filling Curves , 2003, GeoInformatica.

[27]  A. Lindenmayer Mathematical models for cellular interactions in development. II. Simple and branching filaments with two-sided inputs. , 1968, Journal of theoretical biology.

[28]  Marianne Winslett,et al.  Efficient input and output for scientific simulations , 1999, IOPADS '99.

[29]  Hans Sagan On the Geometrization of the Peano Curve and the Arithmetization of the Hilbert Curve , 1992 .

[30]  Leslie M. Goldschlager Short algorithms for space‐filling curves , 1981, Softw. Pract. Exp..

[31]  D. Hilbert Über die stetige Abbildung einer Linie auf ein Flächenstück , 1935 .

[32]  Brian Wyvill,et al.  On the generation and use of space‐filling curves , 1983, Softw. Pract. Exp..

[33]  Jack J. Dongarra,et al.  A Scalable Cross-Platform Infrastructure for Application Performance Tuning Using Hardware Counters , 2000, ACM/IEEE SC 2000 Conference (SC'00).

[34]  Claude-Henri Lamarque,et al.  Image analysis using space-filling curves and 1D wavelet bases , 1996, Pattern Recognit..

[35]  D. Hilbert Ueber die stetige Abbildung einer Line auf ein Flächenstück , 1891 .

[36]  Arthur R. Butz,et al.  Alternative Algorithm for Hilbert's Space-Filling Curve , 1971, IEEE Transactions on Computers.

[37]  Theodore Bially,et al.  Space-filling curves: Their generation and their application to bandwidth reduction , 1969, IEEE Trans. Inf. Theory.

[38]  John J. Bartholdi,et al.  Spacefilling curves and the planar travelling salesman problem , 1989, JACM.

[39]  G. Peano Sur une courbe, qui remplit toute une aire plane , 1890 .

[40]  Guohua Jin,et al.  Increasing Temporal Locality with Skewing and Recursive Blocking , 2001, ACM/IEEE SC 2001 Conference (SC'01).