Skip to main content

Improving the Performance of Morton Layout by Array Alignment and Loop Unrolling

Reducing the Price of Naivety

  • Conference paper
Languages and Compilers for Parallel Computing (LCPC 2003)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2958))

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Alpern, B., Carter, L., Feig, E., Selker, T.: The uniform memory hierarchy model of computation. Algorithmica 12(2/3), 72–109 (1994)

    Article  MathSciNet  MATH  Google Scholar 

  2. 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)

    Google Scholar 

  3. 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)

    Google Scholar 

  4. 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

    Google Scholar 

  5. 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)

    Chapter  Google Scholar 

  6. Hilbert, D.: Über die stetige Abbildung einer Linie auf ein Flächenstück. Math. Ann. 38, 459–460 (1891)

    Article  MathSciNet  MATH  Google Scholar 

  7. 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)

    Google Scholar 

  8. 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)

    Google Scholar 

  9. 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/

  10. 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)

    Article  MATH  Google Scholar 

  11. Wise, D.S., Frens, J.D.: Morton-order Matrices Deserve Compilers’ Support. Technical Report, TR533 (November 1999)

    Google Scholar 

  12. 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

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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

Publish with us

Policies and ethics