Mentions légales du service

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

Update hierarchical/palm4msa 2020 C++ test next to the new no_lambda parameter.

parent 08b30e06
No related branches found
No related tags found
No related merge requests found
......@@ -96,6 +96,7 @@ int main(int argc, char* argv[])
Real<FPP> lambda;
bool isUpdateWayR2L = true, isFactSideLeft = false, packing_RL = false;
bool no_normalization = false;
bool no_lambda = false;
FactorsFormat factors_format = Faust::AllDynamic;
char* str_norm2_threshold = getenv("NORM2_THRESHOLD");
char* str_norm2_max_iter = getenv("NORM2_MAX_ITER");
......@@ -127,7 +128,7 @@ int main(int argc, char* argv[])
// sc.push_back(30);
auto th = Faust::hierarchical(whtmat, sc, fac_cons, res_cons, lambda, isUpdateWayR2L,
isFactSideLeft, factors_format, packing_RL, no_normalization,
isFactSideLeft, factors_format, packing_RL, no_normalization, no_lambda,
MHTPParams<FPP>(),
/* compute_2norm_on_array*/ false,
norm2_threshold,
......
......@@ -101,7 +101,7 @@ int main(int argc, char* argv[])
//algorithm
Real<FPP> lambda;
bool isUpdateWayR2L = true, isFactSideLeft = false, packing_RL = false, no_normalization = false;
bool isUpdateWayR2L = true, isFactSideLeft = false, packing_RL = false, no_normalization = false, no_lambda = false;
Faust::FactorsFormat factors_format = Faust::AllDynamic;
char* str_factors_format = getenv("FACTOR_FORMAT");
char* str_norm2_threshold = getenv("NORM2_THRESHOLD");
......@@ -151,7 +151,7 @@ int main(int argc, char* argv[])
vector<StoppingCriterion<Real<FPP>>> sc = {2,2};
auto th = Faust::hierarchical(whtmat_gpu, sc, fac_cons, res_cons, lambda, isUpdateWayR2L,
isFactSideLeft, factors_format, packing_RL, no_normalization,
isFactSideLeft, factors_format, packing_RL, no_normalization, no_lambda,
Faust::MHTPParams<FPP>(),
/* compute_2norm_on_array*/ false,
norm2_threshold,
......
......@@ -101,7 +101,7 @@ int main(int argc, char* argv[])
data.Display();
bool is_update_way_R2L = false;
FactorsFormat factors_format = AllDynamic;
bool packing_RL = true, no_normalization = false;
bool packing_RL = true, no_normalization = false, no_lambda = false;
packing_RL = false;
int nites = 200;
StoppingCriterion<Real<FPP>> sc(nites);
......@@ -123,7 +123,7 @@ int main(int argc, char* argv[])
else if(meth == 2)
{
cout << "use impl2" << endl;
Faust::palm4msa2<FPP,Cpu>(data, constraints, facts, lambda, sc, is_update_way_R2L, factors_format, packing_RL, no_normalization, MHTPParams<FPP>(), compute_2norm_on_array, norm2_threshold, norm2_max_iter, false, FAUST_PRECISION, on_gpu);
Faust::palm4msa2<FPP,Cpu>(data, constraints, facts, lambda, sc, is_update_way_R2L, factors_format, packing_RL, no_normalization, no_lambda, MHTPParams<FPP>(), compute_2norm_on_array, norm2_threshold, norm2_max_iter, false, FAUST_PRECISION, on_gpu);
}
#ifdef USE_GPU_MOD
else if(meth == 3)
......@@ -131,7 +131,7 @@ int main(int argc, char* argv[])
cout << "use impl3" << endl;
Faust::MatDense<FPP,GPU2> gpu_data(data);
TransformHelper<FPP,GPU2> gpu_facts;
Faust::palm4msa2<FPP,GPU2>(gpu_data, gpu_constraints, gpu_facts, lambda, sc, is_update_way_R2L, factors_format, no_normalization, packing_RL, MHTPParams<FPP>(), compute_2norm_on_array, norm2_threshold, norm2_max_iter, false, FAUST_PRECISION, on_gpu);
Faust::palm4msa2<FPP,GPU2>(gpu_data, gpu_constraints, gpu_facts, lambda, sc, is_update_way_R2L, factors_format, no_normalization, no_lambda, packing_RL, MHTPParams<FPP>(), compute_2norm_on_array, norm2_threshold, norm2_max_iter, false, FAUST_PRECISION, on_gpu);
gpu_facts.display();
gpu_facts.tocpu(facts);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment