Abstract
We describe in this paper new design techniques used in the C++ exact linear algebra library LinBox, intended to make the library safer and easier to use, while keeping it generic and efficient. First, we review the new simplified structure for containers, based on our founding scope allocation model. We explain design choices and their impact on coding: unification of our matrix classes, clearer model for matrices and submatrices, etc. Then we present a variation of the strategy design pattern that is comprised of a controller–plugin system: the controller (solution) chooses among plug-ins (algorithms) that always call back the controllers for subtasks. We give examples using the solution mul. Finally we present a benchmark architecture that serves two purposes: Providing the user with easier ways to produce graphs; Creating a framework for automatically tuning the library and supporting regression testing.
This material is based on work supported in part by the National Science Foundation under Grant CCF-1115772 (Kaltofen) and Grant CCF-1018063 (Saunders).
This material is based on work supported in part by the Agence Nationale pour la Recherche under Grant ANR-11-BS02-013 HPAC (Dumas, Giorgi, Pernet).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Alexandrescu, A.: Modern C++ design: generic programming and design patterns applied. C++ in-depth series. Addison-Wesley (2001)
Boyer, B.: Multiplication matricielle efficace et conception logicielle pour la bibliothéque de calcul exact LinBox. PhD thesis, Université de Grenoble (June 2012)
Boyer, B., Dumas, J.-G.: Matrix multiplication over word-size prime fields using Bini’s approximate formula (submitted, May 2014), http://hal.archives-ouvertes.fr/hal-00987812
Boyer, B., Dumas, J.-G., Giorgi, P.: Exact sparse matrix-vector multiplication on GPU’s and multicore architectures. In: Proceedings of the 4th International Workshop on Parallel and Symbolic Computation, PASCO 2010, pp. 80–88. ACM, New York (2010)
Boyer, B., Dumas, J.-G., Pernet, C., Zhou, W.: Memory efficient scheduling of Strassen-Winograd’s matrix multiplication algorithm. In: Proceedings of the 2009 International Symposium on Symbolic and Algebraic Computation, ISSAC 2009, pp. 55–62. ACM, New York (2009)
Cung, V.-D., Danjean, V., Dumas, J.-G., Gautier, T., Huard, G., Raffin, B., Rapine, C., Roch, J.-L., Trystram, D.: Adaptive and hybrid algorithms: classification and illustration on triangular system solving. In: Dumas, J.-G. (ed.) Proceedings of Transgressive Computing 2006, Granada, España (April 2006)
Dumas, J.-G., Gautier, T., Giesbrecht, M., Giorgi, P., Hovinen, B., Kaltofen, E., Saunders, B.D., Turner, W.J., Villard, G.: LinBox: A generic library for exact linear algebra. In: Proceedings of the 2002 International Congress of Mathematical Software, Beijing China, World Scientific Pub. (August 2002)
Dumas, J.-G., Gautier, T., Pernet, C., Saunders, B.D.: LinBox founding scope allocation, parallel building blocks, and separate compilation. In: Fukuda, K., van der Hoeven, J., Joswig, M., Takayama, N. (eds.) ICMS 2010. LNCS, vol. 6327, pp. 77–83. Springer, Heidelberg (2010)
Dumas, J.-G., Gautier, T., Pernet, C., Sultan, Z.: Parallel computation of echelon forms. In: Proceedings of the 20th International Conference on Parallel Processing, Euro-Par 2014, Porto, Portugal. LNCS, vol. 8632 (August 2014) (to appear)
Dumas, J.-G., Giorgi, P., Pernet, C.: Dense linear algebra over word-size prime fields: the Fflas and Ffpack packages. ACM Trans. Math. Softw. 35(3), 1–42 (2008)
Gamma, E.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley Professional Computing Series. Addison-Wesley (1995)
von zur Gathen, J., Gerhard, J.: Modern Computer Algebra. Cambridge University Press, New York (1999)
Giorgi, P.: Arithmètique et algorithmique en algèbre linéaire exacte pour la bibliothèque LinBox. PhD thesis, École normale supérieure de Lyon (December 2004)
Giorgi, P., Lebreton, R.: Online order basis and its impact on block Wiedemann algorithm. In: Proceedings of the 2014 International Symposium on Symbolic and Algebraic Computation, ISSAC 2014. ACM (to appear, 2014)
Gregor, D., Järvi, J., Kulkarni, M., Lumsdaine, A., Musser, D., Schupp, S.: Generic programming and high-performance libraries. International Journal of Parallel Programming 33, 145–164 (2005), 10.1007/s10766-005-3580-8
Harvey, D.: Faster arithmetic for number-theoretic transforms. Journal of Symbolic Compututations 60, 113–119 (2014)
Stroustrup, B.: The design and evolution of C++. Programming languages/C++. Addison-Wesley (1994)
Sutter, H., Alexandrescu, A.: C++ Coding Standards: 101 Rules, Guidelines, and Best Practices. The C++ In-Depth Series. Addison-Wesley (2005)
Turner, W.J.: Blackbox linear algebra with the library. PhD thesis, North Carolina State University (May 2002)
Wezowicz, M., Saunders, B.D., Taufer, M.: Dealing with performance/portability and performance/accuracy trade-offs in heterogeneous computing systems: a case study with matrix multiplication modulo primes. In: Proc. SPIE, vol. 8403, pp. 08–08–10 (2012)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2014 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Boyer, B., Dumas, JG., Giorgi, P., Pernet, C., Saunders, B.D. (2014). Elements of Design for Containers and Solutions in the LinBox Library. In: Hong, H., Yap, C. (eds) Mathematical Software – ICMS 2014. ICMS 2014. Lecture Notes in Computer Science, vol 8592. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-44199-2_98
Download citation
DOI: https://doi.org/10.1007/978-3-662-44199-2_98
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-662-44198-5
Online ISBN: 978-3-662-44199-2
eBook Packages: Computer ScienceComputer Science (R0)