============= Using CXXBLAS [TOC] ============= FLENS matrix/vector types make iteraction with BLAS easy as you have access to - matrix/vector dimensions, - storage order, - leading dimensions and strides and - data pointers. In addition __CXXBLAS__ makes it easy to reuse the same code for different element types like `float`, `double`, `std::complex`, `std::complex` or any other type that "can be used like a `double`", i.e. relevant operators (e.g. `+`, `*`, ...) are overloaded. Toy Example =========== Assume you want to 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 CXXBLAS for this task you will first call __gemv__ and subsequently __axpy__. Example Code ============ :import: flens/examples/tut02-page01-example.cc [stripped, downloadable] Comments on Example Code ======================== :import: flens/examples/tut02-page01-example.cc [brief] Compile and Run =============== *--[SHELL]-------------------------------------------------------------------* | | | cd flens/examples | | g++ -Wall -std=c++11 -I../.. tut02-page01-example.cc | | ./a.out | | | *----------------------------------------------------------------------------* :links: __CXXBLAS__ -> dir:cxxblas/ __axpy__ -> file:cxxblas/level1/axpy.h __gemv__ -> file:cxxblas/level2/gemv.h :navigate: __up__ -> doc:flens/examples/tutorial __next__ -> doc:flens/examples/tut02-page02