Mentions légales du service

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

Fix wrong call of TransformHelperButterfly::fourierFaust from python wrapper...

Fix wrong call of TransformHelperButterfly::fourierFaust from python wrapper GPU code (it is not supported on GPU).
parent 2467267d
No related branches found
No related tags found
No related merge requests found
......@@ -553,19 +553,6 @@ template<typename FPP, FDevice DEV>
return core;
}
template<typename FPP, FDevice DEV>
FaustCoreCpp<FPP,DEV>* FaustCoreCpp<FPP,DEV>::fourierFaust(unsigned int n, const bool norma, const bool diag_opt)
{
Faust::TransformHelper<FPP,DEV>* th;
if(diag_opt)
th = Faust::TransformHelperButterfly<FPP,DEV>::fourierFaust(n, norma);
else
th = Faust::TransformHelper<FPP,DEV>::fourierFaust(n, norma);
if(!th) return NULL;
FaustCoreCpp<FPP,DEV>* core = new FaustCoreCpp<FPP,DEV>(th);
return core;
}
template<typename FPP, FDevice DEV>
FaustCoreCpp<FPP,DEV>* FaustCoreCpp<FPP,DEV>::eyeFaust(unsigned int n, unsigned int m)
{
......
......@@ -137,3 +137,16 @@ FaustCoreCpp<@TYPE@,Cpu>* FaustCoreCpp<@TYPE@,Cpu>::read_from_mat_file(const cha
}
return core;
}
template<>
FaustCoreCpp<@TYPE@, Cpu>* FaustCoreCpp<@TYPE@,Cpu>::fourierFaust(unsigned int n, const bool norma, const bool diag_opt)
{
Faust::TransformHelper<@TYPE@,Cpu>* th;
if(diag_opt)
th = Faust::TransformHelperButterfly<@TYPE@,Cpu>::fourierFaust(n, norma);
else
th = Faust::TransformHelper<@TYPE@,Cpu>::fourierFaust(n, norma);
if(!th) return NULL;
FaustCoreCpp<@TYPE@,Cpu>* core = new FaustCoreCpp<@TYPE@,Cpu>(th);
return core;
}
......@@ -104,3 +104,16 @@ FaustCoreCpp<@TYPE@,GPU2>* FaustCoreCpp<@TYPE@,GPU2>::read_from_mat_file(const c
throw std::runtime_error("A .mat file is always read from CPU code not GPU's.");
return nullptr;
}
template<>
FaustCoreCpp<@TYPE@, GPU2>* FaustCoreCpp<@TYPE@,GPU2>::fourierFaust(unsigned int n, const bool norma, const bool diag_opt)
{
Faust::TransformHelper<@TYPE@,GPU2>* th;
if(diag_opt)
throw std::runtime_error("Diagonal Optimization of DFT isn't yet supported on GPU.");
else
th = Faust::TransformHelper<@TYPE@,GPU2>::fourierFaust(n, norma);
if(!th) return NULL;
FaustCoreCpp<@TYPE@,GPU2>* core = new FaustCoreCpp<@TYPE@,GPU2>(th);
return core;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment