Mentions légales du service

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

Fix a bug introduced by 0ac2f190 which happens when X (in F*X) has more than one column.

parent 18fcab40
No related branches found
No related tags found
No related merge requests found
......@@ -304,11 +304,11 @@ namespace Faust
auto K_plus_1 = K+1;
auto d_K_plus_1 = d*K_plus_1;
// #pragma omp parallel for // most likely counterproductive to use OpenMP here, Eigen is already multithreading scalar product in the loop
Eigen::Map<Eigen::Matrix<FPP, Eigen::Dynamic, Eigen::Dynamic>> vec_out(out, d, n);
for(int i=0;i<n;i++)
{
Eigen::Map<Eigen::Matrix<FPP, Eigen::Dynamic, Eigen::Dynamic>> mat_basisX(const_cast<FPP*>(basisX+d_K_plus_1*i), d, K_plus_1); //constcast is not dangerous, no modification is done later
Eigen::Map<Eigen::Matrix<FPP, Eigen::Dynamic, 1>> vec_coeffs(const_cast<FPP*>(coeffs), K_plus_1);
Eigen::Map<Eigen::Matrix<FPP, Eigen::Dynamic, 1>> vec_out(out, K_plus_1);
vec_out.block(0,i,d,1) = mat_basisX*vec_coeffs;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment