1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-07 08:24:43 -04:00

FFT factory: reuse flag

This commit is contained in:
f4exb
2020-03-13 07:46:08 +01:00
parent 37082ce41d
commit 30694b4be7
6 changed files with 44 additions and 9 deletions
+19
View File
@@ -4,7 +4,12 @@
FFTWEngine::FFTWEngine(const QString& fftWisdomFileName) :
m_fftWisdomFileName(fftWisdomFileName),
m_plans(),
<<<<<<< ours
m_currentPlan(NULL)
=======
m_currentPlan(nullptr),
m_reuse(true)
>>>>>>> theirs
{
}
@@ -15,12 +20,26 @@ FFTWEngine::~FFTWEngine()
void FFTWEngine::configure(int n, bool inverse)
{
<<<<<<< ours
for(Plans::const_iterator it = m_plans.begin(); it != m_plans.end(); ++it) {
if(((*it)->n == n) && ((*it)->inverse == inverse)) {
m_currentPlan = *it;
return;
}
}
=======
if (m_reuse)
{
for (Plans::const_iterator it = m_plans.begin(); it != m_plans.end(); ++it)
{
if (((*it)->n == n) && ((*it)->inverse == inverse))
{
m_currentPlan = *it;
return;
}
}
}
>>>>>>> theirs
m_currentPlan = new Plan;
m_currentPlan->n = n;