===== FLENS [TOC] ===== FLENS extends C++ for matrix/vector types that are ideally suited for numerical linear algebra. That's it ... ...but the consequences are immense. The simplicity of its design makes the combination FLENS/C++ a powerful tool for the development of high-performance applications and libraries in scientific computing. Features ======== - C++ library (requires a C++11 conform compiler) - Easy install as FLENS is *headers only* - FLENS gives you - Matrix/vector types for dense linear algebra - Generic implementation of BLAS (see __CXXBLAS__) - Generic reimplementation of __LAPACK__ (see __FLENS-LAPACK__) - Generic implementation means that you can use any element type for your matrices/vectors that "acts like a double". So in particular types from the __QD Library__, __mpfr__, ... - If *high performance BLAS* libraries like __ATLAS__ or __GotoBLAS__ are available: - compile with `-DWITH_ATLAS` or `-DWITH_GOTOBLAS` respectively, - link against them and boost performance. FLENS does not introduce any overhead due to abstraction. You get all the performance. - __FLENS-BLAS__ is a high-level and easy-to-use __BLAS__ interface - __FLENS-LAPACK__ is a high-level and easy-to-use C++ implementation of __LAPACK__. - FLENS also allows using overloaded operators for accessing BLAS. Most important in this respect: - Overloaded operators come without performance penalty! - In a special debug mode you can exactly trace what is happening and how you linear algebra expressions gets evaluated through BLAS calls - More features are explained in the __tutorial__. - The combination C++/FLENS is not only competitive with Fortran or C: With respect to performance it is absolutely equivalent. There are not obscure runtime overheads or secretly created temporaries. You are as much in control as you would be with Fortran or C. However, life is so much easier with C++/FLENS. Examples and Tutorial ===================== - Overview of all driver functions currently implemented in __FLENS-LAPACK__ - We just started with a __tutorial__: - __Session 1__: General matrices and dense vectors. - __Session 2__: BLAS, CXXBLAS, FLENS-BLAS and Overloaded Operators. - __Session 3__: More on matrices: Triangular and symmetric matrices, matrix views, ... - __Session 4__: Using FLENS-LAPACK. - __Session 5__: Using an external LAPACK implementation. - __Session 6__: Sparse Matrices (_Experimental_). - __Session 7__: User Defined Matrix Types. Scope of this Branch ==================== - Support of all matrix/vector types one knows from BLAS. This means real and complex matrix types with full, band and packed storage as well as dense vector types: - __GeMatrix__, __HeMatrix__, __SyMatrix__, __TrMatrix__, - __GbMatrix__, __HbMatrix__, __SbMatrix__, __TbMatrix__, - __HpMatrix__, __SpMatrix__, __TpMatrix__, - __DenseVector__. - Sparse matrices are experimental at the moment (but they work very well). - Our generic BLAS implementation __CXXBLAS__. - Support for high and multipecission types from __QD Library__ and __mpfr__. - Support for native BLAS implementations like __ATLAS__ or __GotoBLAS__. - __FLENS-BLAS__ and __FLENS-LAPACK__. - Overloaded operators for BLAS working ontop of the __FLENS-BLAS__ layer. - We improved our __DocTool__ (look at the bottom of each page for *document source*). Compiler Requirements ===================== FLENS uses some of the C++11 features and therefore requires a recent C++ compiler: - __clang__ version 3.0 (or higher) - __gcc__ version 4.7 (or higher) - __icc__ version 12.1.2 (or higher) Git It/Download =============== You can clone a public branch from __GitHub__ *--[BOX]------------------------------------------------------------------* | | | git clone git://github.com/michael-lehn/FLENS.git | | | *-------------------------------------------------------------------------* or download a __snapshot__. # Why Nobody Uses C++ in Scientific Computing # =========================================== # LAPACK is written in Fortran77. This is a very old programming language, not # object oriented and without generic programming features. LAPACK is tightly # coupled with BLAS. BLAS consists of a number of kernel routines that do all # the performance critical computations. The interface of BLAS is really # low-level. Does this sound bad to you? Do you think it is old fashioned and # out dated? # # People using Fortran/LAPACK/BLAS in scientific computing often deal with # problems where performance and memory resources really matter. This includes # such extreme cases where a numerical simulation runs for several months. And # where problem sizes (e.g. matrix dimensions) are chosen so big that it just # fits into memory. In this problem domains loosing a few percentages in # performance would really hurt. Furthermore, creating temporaries is a big # deal and instead one carefully plans how much extra workspace is needed in # total for the complete application. So managing and controlling resources like # memory and CPU time is crucial. This renders tools and techniques with obscure # side effects like the creation of temporaries useless. Transparency of what # is going on is also a key requirement for all computational routines. It is # important to know how things are done. This way you can exactly localize # routines that are critical for performance. # # # # # # C++ is a modern programming language. It allows object oriented programming # as well as generic programming. Beside the standard template library numerous # C++ libraries exist that further enhance the core capabilities of C++. Being # a little bit hyperbolic: every programming feature one possibly could imagine # is somehow provided by C++. Either directly or through an additional C++ # library. # # If you compare the Fortran77 LAPACK/BLAS combination with an arbitrary numerical # C++ library you would expect that LAPACK/BLAS has Mailing List ============ Join the mailing __list__! Contributors ============ - Iris Häcker - __Michael Lehn__ - Klaus Pototzky - Alexander Stippler FLENS Legacy (2003-2011) ======================== Here's the site of the __old FLENS__ (pre-C++11). It needs an update but otherwise _Everything You Always Wanted to Know About FLENS, But Were Afraid to Ask_ (__PDF__) still gives a good introduction to FLENS, LAPACK and BLAS. Furthermore, it shows how FLENS can be used for the development of higher-level numerical applications. :links: __FLENS-LAPACK__ -> doc:flens/lapack/lapack __FLENS-BLAS__ -> doc:flens/blas/blas __DocTool__ -> http://www.mathematik.uni-ulm.de/~lehn/DocTool __BLAS__ -> http://www.netlib.org/blas/ __LAPACK__ -> http://www.netlib.org/lapack/ __tutorial__ -> doc:flens/examples/tutorial __Session (\d)__ -> doc:flens/examples/tutorial#$1 __GeMatrix__ -> doc:flens/matrixtypes/general/impl/gematrix __GbMatrix__ -> doc:flens/matrixtypes/general/impl/gbmatrix __HeMatrix__ -> doc:flens/matrixtypes/hermitian/impl/hematrix __HbMatrix__ -> doc:flens/matrixtypes/hermitian/impl/hbmatrix __HpMatrix__ -> doc:flens/matrixtypes/hermitian/impl/hpmatrix __SyMatrix__ -> doc:flens/matrixtypes/symmetric/impl/symatrix __SbMatrix__ -> doc:flens/matrixtypes/symmetric/impl/sbmatrix __SpMatrix__ -> doc:flens/matrixtypes/symmetric/impl/spmatrix __TrMatrix__ -> doc:flens/matrixtypes/triangular/impl/trmatrix __TbMatrix__ -> doc:flens/matrixtypes/triangular/impl/tbmatrix __TpMatrix__ -> doc:flens/matrixtypes/triangular/impl/tpmatrix __DenseVector__ -> doc:flens/vectortypes/impl/densevector __CXXBLAS__ -> doc:cxxblas/cxxblas __QD Library__ -> http://crd-legacy.lbl.gov/~dhbailey/mpdist __mpfr__ -> http://www.mpfr.org __ATLAS__ -> http://math-atlas.sourceforge.net __GotoBLAS__ -> http://www.tacc.utexas.edu/tacc-projects/gotoblas2 __GitHub__ -> http://github.com/michael-lehn/FLENS __clang__ -> http://clang.llvm.org/ __gcc__ -> http://gcc.gnu.org/ __icc__ -> http://software.intel.com/en-us/articles/intel-compilers/ __snapshot__ -> http://www.mathematik.uni-ulm.de/~lehn/FLENS/downloads/ __list__ -> https://imap.uni-ulm.de/lists/info/flens __old FLENS__ -> http://flens.sf.net/legacy __Michael Lehn__ -> http://www.uni-ulm.de/mawi/mawi-numerik/mitarbeiter/mlehn.html __PDF__ -> http://flens.sourceforge.net/flensdoc.pdf