Mentions légales du service

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

Fix a nullptr error in C++ MHTP module (due to 60524e31 update).

parent 8b1edf2f
No related branches found
No related tags found
No related merge requests found
Pipeline #834035 skipped
...@@ -57,15 +57,16 @@ namespace Faust ...@@ -57,15 +57,16 @@ namespace Faust
Real<FPP> &c, Real<FPP> &c,
Real<FPP>& lambda) Real<FPP>& lambda)
{ {
Faust::MatGeneric<FPP,DEVICE>* cur_fac; Faust::MatGeneric<FPP,DEVICE>* cur_fac;
cur_fac = S.get_gen_fact_nonconst(f_id); // set the factor to zero
S.get_gen_fact_nonconst(f_id)->setZeros();
if(is_verbose) if(is_verbose)
std::cout << "Starting a MHTP pass ("<< mhtp_params.sc.get_crit() <<" iterations) for factor #" << f_id << std::endl; std::cout << "Starting a MHTP pass ("<< mhtp_params.sc.get_crit() <<" iterations) for factor #" << f_id << std::endl;
int j = 0; int j = 0;
// set the factor to zero
cur_fac->setZeros();
while(mhtp_params.sc.do_continue(j)) // TODO: what about the error stop criterion? while(mhtp_params.sc.do_continue(j)) // TODO: what about the error stop criterion?
{ {
cur_fac = S.get_gen_fact_nonconst(f_id);
update_fact(cur_fac, f_id, A, S, pL, pR, update_fact(cur_fac, f_id, A, S, pL, pR,
is_verbose, constraint, is_verbose, constraint,
norm2_max_iter, norm2_threshold, norm2_duration, fgrad_duration, norm2_max_iter, norm2_threshold, norm2_duration, fgrad_duration,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment