In getrf.cc:
double da [] = { 1, 2, 2, 2, 1, 2, 2, 2, 1 };
lapack_matrix<double,external>::type A(da, M, N);
lapack_matrix<double>::type B(M*NRHS, NRHS);
mtl::set(B, 15.0);
dense1D<int> pivot(N, 0);
int info = getrf(A, pivot);
if (info == 0) {
info = getrs('N', A, pivot, B);
if (info == 0) {
cout << "x:" << endl;
print_all_matrix(B);
} else
cout << "Factorization failed with INFO = " << info << endl;
} else
cout << "Solve failed with INFO = " << info << endl;
More examples can be found in geequ.cc, gecon.cc, geev.cc
|