Tutorial

FLENS has many great features. Looking through all the examples given in this tutorial should give you a first impression and a quick start.

More tutorials are on the way ...

... so stay tuned.

General Matrix with Full Storage

 We show how to allocate and initialize a general matrix. Shows how to change the default index base which is One. We introduce the concept of matrix views. Matrix views can be used to reference other matrix parts. Furthermore it allows the creation of a FLENS matrix(view) from an existing C-array copying the C-array. The latter is very useful for interfacing with other libraries. We introduce dense vectors. Working with complex vectors and matrices. Element-wise matrix/vector operations. How FLENS ensures const-correctness and MTL4 not. Why matrix views are so important: Implementation of a blocked and unblock $$LU$$ factorization.

BLAS, CXXBLAS, FLENS-BLAS and Overloaded Operators

 Using CXXBLAS directly. CXXBLAS provides a generic BLAS implementation but also can serve as a interface to high performance BLAS implementations. Using FLENS-BLAS which is a high-level interface to CXXBLAS. Using overloaded operators for BLAS operations. This is an even higher-level BLAS interface. FLENS has some nice feature that allows logging how BLAS actually gets used for the evaluation of complicated linear algebra operations. How FLENS helps you avoiding the creation of temporaries when evaluation linear algebra expressions. Equivalence of FLENS-BLAS and overloaded operation notation.

Symmetric and Triangular Matrices with Full Storage

 We show how to create triangular and symmetric views from a general matrix.

FLENS-LAPACK

 Computing a LU factorization. Computing a QR factorization. Solving systems of linear equations. Computing eigenvalues and eigenvectors.

Using an external LAPACK implementation

 Using CXXLAPACK (Low-Level LAPACK interface) directly. Creating a high-level interface for CXXLAPACK. Using FLENS-LAPACK as MKL, ACML or LAPACK Font-End.

Sparse Matrices (Experimental)

 Setup a matrix in coordinate storage and convert it to compressed column storage. Setup a matrix in coordinate storage, convert it to compressed column storage and finally use SuperLU to solve a sparse system of linear equations. Setup a matrix in coordinate storage and convert it to compressed row storage. Setup a matrix in coordinate stoage, convert it to compressed row storage and finally use SuperLU to solve a sparse system of linear equations. Iterative Solver: Conjugated Gradient Method.