Mentions légales du service

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

Minor fix: update hierarchical calls in tests to follow (no_normalization) signature change.

parent cd5f4b29
No related branches found
No related tags found
No related merge requests found
...@@ -95,6 +95,7 @@ int main(int argc, char* argv[]) ...@@ -95,6 +95,7 @@ int main(int argc, char* argv[])
Real<FPP> lambda; Real<FPP> lambda;
bool isUpdateWayR2L = true, isFactSideLeft = false, packing_RL = false; bool isUpdateWayR2L = true, isFactSideLeft = false, packing_RL = false;
bool no_normalization = false;
FactorsFormat factors_format = Faust::AllDynamic; FactorsFormat factors_format = Faust::AllDynamic;
char* str_norm2_threshold = getenv("NORM2_THRESHOLD"); char* str_norm2_threshold = getenv("NORM2_THRESHOLD");
char* str_norm2_max_iter = getenv("NORM2_MAX_ITER"); char* str_norm2_max_iter = getenv("NORM2_MAX_ITER");
...@@ -126,7 +127,7 @@ int main(int argc, char* argv[]) ...@@ -126,7 +127,7 @@ int main(int argc, char* argv[])
// sc.push_back(30); // sc.push_back(30);
auto th = Faust::hierarchical(whtmat, sc, fac_cons, res_cons, lambda, isUpdateWayR2L, auto th = Faust::hierarchical(whtmat, sc, fac_cons, res_cons, lambda, isUpdateWayR2L,
isFactSideLeft, factors_format, packing_RL, isFactSideLeft, factors_format, packing_RL, no_normalization,
MHTPParams<FPP>(), MHTPParams<FPP>(),
/* compute_2norm_on_array*/ false, /* compute_2norm_on_array*/ false,
norm2_threshold, norm2_threshold,
......
...@@ -101,7 +101,7 @@ int main(int argc, char* argv[]) ...@@ -101,7 +101,7 @@ int main(int argc, char* argv[])
//algorithm //algorithm
Real<FPP> lambda; Real<FPP> lambda;
bool isUpdateWayR2L = true, isFactSideLeft = false, packing_RL = false; bool isUpdateWayR2L = true, isFactSideLeft = false, packing_RL = false, no_normalization = false;
Faust::FactorsFormat factors_format = Faust::AllDynamic; Faust::FactorsFormat factors_format = Faust::AllDynamic;
char* str_factors_format = getenv("FACTOR_FORMAT"); char* str_factors_format = getenv("FACTOR_FORMAT");
char* str_norm2_threshold = getenv("NORM2_THRESHOLD"); char* str_norm2_threshold = getenv("NORM2_THRESHOLD");
...@@ -151,7 +151,7 @@ int main(int argc, char* argv[]) ...@@ -151,7 +151,7 @@ int main(int argc, char* argv[])
vector<StoppingCriterion<Real<FPP>>> sc = {2,2}; vector<StoppingCriterion<Real<FPP>>> sc = {2,2};
auto th = Faust::hierarchical(whtmat_gpu, sc, fac_cons, res_cons, lambda, isUpdateWayR2L, auto th = Faust::hierarchical(whtmat_gpu, sc, fac_cons, res_cons, lambda, isUpdateWayR2L,
isFactSideLeft, factors_format, packing_RL, isFactSideLeft, factors_format, packing_RL, no_normalization,
Faust::MHTPParams<FPP>(), Faust::MHTPParams<FPP>(),
/* compute_2norm_on_array*/ false, /* compute_2norm_on_array*/ false,
norm2_threshold, norm2_threshold,
......
...@@ -101,7 +101,7 @@ int main(int argc, char* argv[]) ...@@ -101,7 +101,7 @@ int main(int argc, char* argv[])
data.Display(); data.Display();
bool is_update_way_R2L = false; bool is_update_way_R2L = false;
FactorsFormat factors_format = AllDynamic; FactorsFormat factors_format = AllDynamic;
bool packing_RL = true; bool packing_RL = true, no_normalization = false;
packing_RL = false; packing_RL = false;
int nites = 200; int nites = 200;
StoppingCriterion<Real<FPP>> sc(nites); StoppingCriterion<Real<FPP>> sc(nites);
...@@ -123,7 +123,7 @@ int main(int argc, char* argv[]) ...@@ -123,7 +123,7 @@ int main(int argc, char* argv[])
else if(meth == 2) else if(meth == 2)
{ {
cout << "use impl2" << endl; cout << "use impl2" << endl;
Faust::palm4msa2<FPP,Cpu>(data, constraints, facts, lambda, sc, is_update_way_R2L, factors_format, packing_RL, 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, MHTPParams<FPP>(), compute_2norm_on_array, norm2_threshold, norm2_max_iter, false, FAUST_PRECISION, on_gpu);
} }
#ifdef USE_GPU_MOD #ifdef USE_GPU_MOD
else if(meth == 3) else if(meth == 3)
...@@ -131,7 +131,7 @@ int main(int argc, char* argv[]) ...@@ -131,7 +131,7 @@ int main(int argc, char* argv[])
cout << "use impl3" << endl; cout << "use impl3" << endl;
Faust::MatDense<FPP,GPU2> gpu_data(data); Faust::MatDense<FPP,GPU2> gpu_data(data);
TransformHelper<FPP,GPU2> gpu_facts; TransformHelper<FPP,GPU2> gpu_facts;
Faust::palm4msa2<FPP,GPU2>(gpu_data, gpu_constraints, gpu_facts, lambda, sc, is_update_way_R2L, factors_format, 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, packing_RL, MHTPParams<FPP>(), compute_2norm_on_array, norm2_threshold, norm2_max_iter, false, FAUST_PRECISION, on_gpu);
gpu_facts.display(); gpu_facts.display();
gpu_facts.tocpu(facts); 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