Mentions légales du service

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

Fix normalization issue of pyfaust/matfaust.dft when diag_opt is True (#275).

parent 3a12594a
No related branches found
No related tags found
No related merge requests found
Pipeline #834113 skipped
......@@ -7,11 +7,16 @@ namespace Faust
int i = 0;
auto size = this->getNbRow();
D.resize(size);
for(auto csr_fac: facts)
// for(auto csr_fac: facts)
// use rather recorded factors in the Faust::Transform because one might have been multiplied with lambda_
for(auto csr_fac_it = this->begin(); csr_fac_it != this->end(); csr_fac_it++)
{
auto csr_fac = *csr_fac_it;
if(i < facts.size()-1)
opt_factors.insert(opt_factors.begin(), ButterflyMat<FPP>(*dynamic_cast<const MatSparse<FPP, Cpu>*>(csr_fac), i++));
}
// set the permutation factor
auto csr_fac = *(facts.end()-1);
auto csr_fac = *(this->end()-1);
perm_d_ptr = D.diagonal().data();
// only a setOnes should be enough because this is a permutation matrix (but it could be normalized)
memcpy(perm_d_ptr, dynamic_cast<const MatSparse<FPP, Cpu>*>(csr_fac)->getValuePtr(), size*sizeof(FPP));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment