1 #include <flens/flens.cxx>
 2 #include <iostream>
 3 
 4 using namespace flens;
 5 using namespace std;
 6 
 7 int
 8 main()
 9 {
10     typedef double                               T;
11     typedef DenseVector<Array<T> >               DEVector;
12     typedef GeMatrix<FullStorage<T, ColMajor> >  GEMatrix;
13 
14     const T  alpha = 1.5,
15              beta = 2.5;
16 
17     DEVector x(3), y(3), z(3);
18     x = 123;
19     y = 234;
20     z = 345;
21 
22     GEMatrix A(3,3);
23     A = 123,
24         567,
25         543;
26 
27     ///
28     /// We turn on logging of the closure evaluation, i.e. the evaluation
29     /// of linear algebra expressions that are coded through overloaded
30     /// operators.
31     ///
32     verbose::ClosureLog::start("mylogfile");
33 
34     ///
35     /// Compute $y = \beta y + \alpha A^T x + z$
36     ///
37     y = beta*y + alpha*transpose(A)*x + z;
38 
39     cout << "y = " << y << endl;
40 
41     ///
42     /// Stop logging.
43     ///
44     verbose::ClosureLog::stop();
45 
46     return 0;
47 }