Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 21d21ff6 authored by hhakim's avatar hhakim
Browse files

Add a verbosity attribute in Faust::GivensFGFT.

verbosity == 1 implies to print the count of iterations along the algorithm execution.
parent fd37d5ee
Branches
Tags
No related merge requests found
......@@ -69,6 +69,9 @@ namespace Faust {
/** \brief true if D has already been ordered (order_D() was called). */
bool is_D_ordered;
/** \brief The level of verbosity (0 for nothing, 1 for iteration numbers,...) */
unsigned int verbosity;
/**
* \brief Row index for the selected pivot in L.
*/
......
......@@ -237,8 +237,8 @@ void GivensFGFT<FPP,DEVICE,FPP2>::update_err()
err_d = Lap.norm();
err_d *= err_d;
err /= err_d;
cout << "ite. i: "<< ite << " err.: " << err << endl;
//TODO: boolean to display error or verbose mode
if(verbosity)
cout << "GivensFGFT ite. i: "<< ite << " err.: " << err << endl;
}
}
......@@ -282,7 +282,7 @@ void GivensFGFT<FPP,DEVICE,FPP2>::compute_facts()
}
template<typename FPP, Device DEVICE, typename FPP2>
GivensFGFT<FPP,DEVICE,FPP2>::GivensFGFT(Faust::MatDense<FPP,DEVICE>& Lap, int J) : Lap(Lap), facts(J), D(Lap.getNbRow(), Lap.getNbCol()), C(Lap.getNbRow(), Lap.getNbCol()), errs(J), coord_choices(J), L(Lap), q_candidates(new int[Lap.getNbCol()]), is_D_ordered(false), always_theta2(false)
GivensFGFT<FPP,DEVICE,FPP2>::GivensFGFT(Faust::MatDense<FPP,DEVICE>& Lap, int J) : Lap(Lap), facts(J), D(Lap.getNbRow(), Lap.getNbCol()), C(Lap.getNbRow(), Lap.getNbCol()), errs(J), coord_choices(J), L(Lap), q_candidates(new int[Lap.getNbCol()]), is_D_ordered(false), always_theta2(false), verbosity(0)
{
/* Matlab ref. code:
* facts = cell(1,J);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment