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
#include <iostream>
#include <flens/flens.cxx>

using namespace flens;
using namespace std;

int
main()
{
    GeMatrix<FullStorage<double> >  A(3,3);
    GeMatrix<FullStorage<double> >  B(3,1);
    DenseVector<Array<int> >        piv(3);

    A = 0.77474424875971437121080498400260694324970245361328,  0.089228524340765905109584821275348076596856117248535,   -0.12712976970911193941304873078479431569576263427734,
        0.76865898723569636707964036759221926331520080566406, -0.00014958376843635101671736720163607969880104064941406, -0.00013158082193623354960720917006256058812141418457031,
        0.10398934744127336093910685121954884380102157592773,  0.80030935278396719834148598238243721425533294677734,    -8.8264758668117485398973975918579526478424668312073e-08;

    B = 0.33333333333333331482961625624739099293947219848633,
        0.33333333333333331482961625624739099293947219848633,
        0.33333333333333331482961625624739099293947219848633;

    piv = 233;

    lapack::trs(Trans, A, piv, B);

    cout << "B = " << B << endl;
}