1
      2
      3
      4
      5
      6
      7
      8
      9
     10
     11
     12
     13
     14
     15
     16
     17
     18
     19
     20
     21
     22
     23
     24
     25
     26
     27
     28
     29
     30
     31
     32
     33
     34
     35
     36
     37
     38
     39
     40
     41
     42
#include <flens/flens.cxx>
#include <iostream>

using namespace flens;
using namespace std;

int
main()
{
    typedef double                               T;
    typedef DenseVector<Array<T> >               DEVector;
    typedef GeMatrix<FullStorage<T, ColMajor> >  GEMatrix;

    DEVector x(3);
    x = 123;

    GEMatrix A(3,3);
    A = 123,
        567,
        543;

    ///
    /// We turn on logging of the closure evaluation, i.e. the evaluation
    /// of linear algebra expressions that are coded through overloaded
    /// operators.
    ///
    verbose::ClosureLog::start("mylogfile");

    ///
    /// Compute $x = A x$
    ///
    x = A*x;

    cout << "x = " << x << endl;

    ///
    /// Stop logging.
    ///
    verbose::ClosureLog::stop();

    return 0;
}