================ Using FLENS-BLAS [TOC] ================ __FLENS-BLAS__ is built on top of __CXXBLAS__ and utilizes FLENS matrix/vector types. Main benefits are: - It is easier to use as functions from FLENS-BLAS require less arguments - Technical details like are encapsulated in the implementation and hidden from the user. You pass complete matrix/vector types instead of things like pointers and dimensions. This makes your code less error prone. Toy Example =========== We use the same example as before, i.e. we compute $y = \beta y + \alpha\,A^T x + z$ where $\alpha, \beta$ are scalars, $x, y, z$ are (dense) vectors and $A$ is a (general) matrix (with full storage). Using FLENS-BLAS for this task we - first call __mv__ which internally calls __gemv__ from CXXBLAS - and subsequently __axpy__ which internnaly calls __axpy[1]__ from CXXBLAS. As long as you do not compile with `-DNDEBUG` the FLENS-BLAS layer also does some error-checking on its arguments. Example Code ============ :import: flens/examples/tut02-page02-example.cc [stripped, downloadable] Comments on Example Code ======================== :import: flens/examples/tut02-page02-example.cc [brief] Compile and Run =============== *--[SHELL]-------------------------------------------------------------------* | | | cd flens/examples | | g++ -Wall -std=c++11 -I../.. tut02-page02-example.cc | | ./a.out | | | *----------------------------------------------------------------------------* :links: __FLENS-BLAS__ -> doc:flens/blas/blas __CXXBLAS__ -> dir:cxxblas/ __axpy__ -> file:flens/blas/level1/axpy.h __mv__ -> file:flens/blas/level2/mv.h __axpy\[1\]__ -> file:cxxblas/level1/axpy.h __gemv__ -> file:cxxblas/level2/gemv.h :navigate: __up__ -> doc:flens/examples/tutorial __back__ -> doc:flens/examples/tut02-page01 __next__ -> doc:flens/examples/tut02-page03