Abstract
Hierarchically-blocked non-linear storage layouts, such as the Morton ordering, have been proposed as a compromise between row-major and column-major for two-dimensional arrays. Morton layout offers some spatial locality whether traversed row-wise or column-wise. The goal of this paper is to make this an attractive compromise, offering close to the performance of row-major traversal of row-major layout, while avoiding the pathological behaviour of column-major traversal. We explore how spatial locality of Morton layout depends on the alignment of the array’s base address, and how unrolling has to be aligned to reduce address calculation overhead. We conclude with extensive experimental results using five common processors and a small suite of benchmark kernels.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Alpern, B., Carter, L., Feig, E., Selker, T.: The uniform memory hierarchy model of computation. Algorithmica 12(2/3), 72–109 (1994)
Chatterjee, S., Jain, V.V., Lebeck, A.R., Mundhra, S., Thottethodi, M.: Nonlinear array layouts for hierarchical memory systems. In: ICS 1999: Proceedings of the 1999 International Conference on Supercomputing, June 20–25, pp. 444–453 (1999)
Chatterjee, S., Lebeck, A.R., Patnala, P.K., Thottethodi, M.: Recursive array layouts and fast parallel matrix multiplication. In: SPAA 1999: Eleventh Annual ACM Symposium on Parallel Algorithms and Architectures, New York, June 1999, pp. 222–231 (1999)
Drakenberg, P., Lundevall, F., Lisper, B.: An efficient semihierarchical array layout. In: Proceedings of the Workshop on Interaction between Compilers and Computer Architectures, Monterrey, Mexico, January 2001. Kluwer, Dordrecht (2001), Available via www.mrtc.mdh.se
Gustavson, F., Henriksson, A., Jonsson, I., Kaagstroem, B.: Recursive blocked data formats and BLAS’s for dense linear algebra algorithms. In: Kågström, B., Elmroth, E., Waśniewski, J., Dongarra, J. (eds.) PARA 1998. LNCS, vol. 1541, pp. 195–206. Springer, Heidelberg (1998)
Hilbert, D.: Über die stetige Abbildung einer Linie auf ein Flächenstück. Math. Ann. 38, 459–460 (1891)
Rivera, G., Tseng, C.-W.: Data transformations for eliminating conflict misses. In: PLDI 1998: Proceedings of the ACM SIGPLAN 1998 Conference on Programming Language Design and Implementation, Montreal, Canada, June 17–19, pp. 38–49 (1998)
Thiyagalingam, J., Beckmann, O., Kelly, P.H.J.: An exhaustive evaluation of row-major, column-major and Morton layouts for large twodimensional arrays. In: Jarvis, S.A. (ed.) Performance Engineering: 19th Annual UK Performance Engineering Workshop, July 2003, pp. 340–351. University of Warwick, UK (2003)
Thiyagalingam, J., Beckmann, O., Kelly, P.H.J.: Improving the performance of basic morton layout by array alignment and loop unrolling — towards a better compromise storage layout. Technical report, Department of Computing, Imperial College London, Available via (September 2003), http://www.doc.ic.ac.uk/~jeyan/
Valsalam, V., Skjellum, A.: A framework for high-performance matrix multiplication based on hierarchical abstractions, algorithms and optimized low-level kernels. Concurrency and Computation: Practice and Experience 14(10), 805–839 (2002)
Wise, D.S., Frens, J.D.: Morton-order Matrices Deserve Compilers’ Support. Technical Report, TR533 (November 1999)
Wise, D.S., Frens, J.D., Gu, Y., Alexander, G.A.: Language support for Morton-order matrices. ACM SIGPLAN Notices 36(7), 24–33 (2001); Proceedings of PPoPP 2001
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2004 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Thiyagalingam, J., Beckmann, O., Kelly, P.H.J. (2004). Improving the Performance of Morton Layout by Array Alignment and Loop Unrolling. In: Rauchwerger, L. (eds) Languages and Compilers for Parallel Computing. LCPC 2003. Lecture Notes in Computer Science, vol 2958. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-24644-2_16
Download citation
DOI: https://doi.org/10.1007/978-3-540-24644-2_16
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-21199-0
Online ISBN: 978-3-540-24644-2
eBook Packages: Springer Book Archive