1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-07-24 19:14:15 -04:00

FT8 support: optimize FFT buffers and plan allocation

This commit is contained in:
f4exb
2023-01-25 16:30:40 +01:00
parent c1c64b23e4
commit c5a9f5fe12
7 changed files with 165 additions and 49 deletions
+5 -10
View File
@@ -38,7 +38,7 @@ FT8Plans::~FT8Plans()
qDebug("FT8::FT8Plans::~FT8Plans: %lu plans to delete", m_plans.size());
for (auto& plan : m_plans) {
delete plan;
delete plan.second;
}
}
@@ -55,19 +55,14 @@ Plan *FT8Plans::getPlan(int n)
{
QMutexLocker mlock(&m_globalPlanMutex);
for (auto& plan : m_plans)
{
if ((plan->n_ == n) && (plan->type_ == Plan::M_FFTW_TYPE)) {
return plan;
}
if (m_plans.find(n) != m_plans.end()) {
return m_plans[n];
}
fftwf_set_timelimit(5);
Plan *p = new Plan(n);
m_plans.push_back(p);
return p;
m_plans[n] = new Plan(n);
return m_plans[n];
}
}