Skip to main content

A MATLAB-Based Code Generator for Sparse Matrix Computations

  • Conference paper
Programming Languages and Systems (APLAS 2004)

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

Included in the following conference series:

Abstract

We present a matrix language compiler CMC which translates annotated MATLAB scripts into FortranĀ 90 programs. Distinguishing features of CMC include its applicability to programs with sparse matrix computations and its capability of source-level optimization in MATLAB language. Different from other existing similar translators, CMC has an ability to generate codes based on information on the shape of matrices such as triangular and diagonal. Integrating these functionalities, CMC provides the user with a simple way to develop fast large-scale numerical computation codes beyond prototyping. Experimental results show that the programs of SOR and CG methods generated by CMC can run several times as fast as the original MATLAB scripts.

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. Aho, A.V., Sethi, R., Ullman, J.D.: Compilers ā€” Principles, Techniques, and Tools. Addison Wesley, Reading (1986)

    MATHĀ  Google ScholarĀ 

  2. Almasi, G., Padua, D.: MaJIC: Compiling MATLAB for Speed and Responsiveness. In: Proc.Ā PLDI 2002, pp. 294ā€“303 (2002)

    Google ScholarĀ 

  3. Barrett, R., et al.: Templates for the Solution of Linear Systems: Building Blocks for Iterative Methods. SIAM, Philadelphia (1994)

    BookĀ  Google ScholarĀ 

  4. Bik, A.J.C., Wijshoff, H.A.G.: Compilation Techniques for Sparse Matrix Computations. In: Proc. ICS 1993, pp. 416ā€“424 (1993)

    Google ScholarĀ 

  5. Bik, A.J.C., et al.: The Automatic Generation of Sparse Primitives. ACM Trans.Ā Math.Ā Softw.Ā 24(2), 190ā€“225 (1998)

    ArticleĀ  MathSciNetĀ  MATHĀ  Google ScholarĀ 

  6. Chang, R.-G., Chuang, T.-R., Lee, J.K.: Compiler Optimizations for Parallel Sparse Programs with Array Intrinsics of FortranĀ 90. In: Proc. Intl.Ā Conf.Ā Parallel Processing, pp. 103ā€“110 (1999)

    Google ScholarĀ 

  7. Chang, R.-G., Chuang, T.-R., Lee, J.K.: Efficient Support of Parallel Sparse Computation for Array Intrinsic Functions of FortranĀ 90. In: Proc.Ā ICS 1998, pp. 45ā€“52 (1998)

    Google ScholarĀ 

  8. De Rose, L., Padua, D.: Techniques for the translation of MATLAB programs into FortranĀ 90. ACM Trans.Ā Programming Languages and SystemsĀ 21(2), 286ā€“323 (1999)

    ArticleĀ  Google ScholarĀ 

  9. Doornik, J.A.: Ox: Object-Oriented Matrix Language, 4th edn. Timberlake Consultants Press (2001)

    Google ScholarĀ 

  10. Duff, I.S., et al.: Level 3 Basic Linear Algebra Subprograms for Sparse Matrices: A User-Level Interface. ACM Trans.Ā Math.Ā Softw.Ā 23(3), 379ā€“401 (1997)

    ArticleĀ  MathSciNetĀ  MATHĀ  Google ScholarĀ 

  11. Fitzpatrick, S., Clint, M., Kilpatrick, P.: The Automated Derivation of Sparse Implementations of Numerical Algorithms through Program Transformation, Tech.Ā Rep. 1995/Apr-SF.MC.PLK, Dept.Ā Comput.Ā Sci. The Queenā€™s University of Belfast (1995)

    Google ScholarĀ 

  12. Gilbert, J.R., Moler, C., Schreiber, R.: Sparse Matrices in MATLAB: Design and Implementation. SIAM J.Ā Matrix Anal.Ā Appl.Ā 13(1), 333ā€“356 (1992)

    ArticleĀ  MathSciNetĀ  MATHĀ  Google ScholarĀ 

  13. Kawabata, H., Suzuki, M.: CMC: A Compiler for Sparse Matrix Computations (in Japanese). IPSJ Trans.Ā Advanced Computing Systems (to appear)

    Google ScholarĀ 

  14. Koga, M.: MaTX Userā€™s Manual, http://www.matx.org/

  15. The MathWorks, Inc. homepage, www.mathworks.com

  16. The MathWorks, Inc.: MATLAB Compiler Version 3 Userā€™s Guide (2002)

    Google ScholarĀ 

  17. Menon, V., Pingali, K.: A Case for Source-Level Transformations in MATLAB. In: Proc.Ā DSL 1999, pp. 53ā€“65 (1999)

    Google ScholarĀ 

  18. Ramaswamy, S., et al.: Compiling MATLAB Programs to ScaLAPACK: Exploiting Task and Data Parallelism. In: Proc.Ā IPPS 1996, pp. 613ā€“619 (1996)

    Google ScholarĀ 

  19. Quinn, M.J., Malishevsky, A., Seelam, N.: Otter: Bridging the Gap between MATLAB and ScaLAPACK. In: Proc.Ā 8th IEEE Intl.Ā Symp.Ā High Performance Distributed Computing (1998)

    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

Kawabata, H., Suzuki, M., Kitamura, T. (2004). A MATLAB-Based Code Generator for Sparse Matrix Computations. In: Chin, WN. (eds) Programming Languages and Systems. APLAS 2004. Lecture Notes in Computer Science, vol 3302. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-30477-7_19

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-30477-7_19

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-23724-2

  • Online ISBN: 978-3-540-30477-7

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics