Mentions légales du service

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

Update TransformHelper::pruneout to remove 0x0 factors and optimize_multiply...

Update TransformHelper::pruneout to remove 0x0 factors and optimize_multiply to keep the transposition config in the new Faust.
parent 89ef3e4a
Branches
Tags
No related merge requests found
...@@ -450,6 +450,7 @@ namespace Faust { ...@@ -450,6 +450,7 @@ namespace Faust {
this->set_FM_mul_mode(old_meth); this->set_FM_mul_mode(old_meth);
} }
delete [] times; delete [] times;
t_opt->copy_transconj_state(*this);
return t_opt; return t_opt;
} }
...@@ -570,6 +571,15 @@ namespace Faust { ...@@ -570,6 +571,15 @@ namespace Faust {
_npasses++; _npasses++;
if(!factor_touched && npasses == -1) break; if(!factor_touched && npasses == -1) break;
} }
// remove 0x0 factors
for(int i = pth->size()-2; i > 0; i--)
{
auto fac_nrows = pth->get_fact_nb_rows(i);
auto fac_ncols = pth->get_fact_nb_cols(i);
std::cout << "fac nrows, ncols:" << fac_nrows << " " << fac_ncols << std::endl;
if(fac_nrows == 0 && fac_ncols == 0)
pth->transform->erase(i);
}
pth->transform->update_total_nnz(); pth->transform->update_total_nnz();
pth->copy_transconj_state(*this); pth->copy_transconj_state(*this);
return pth; return pth;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment