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:
+5
-10
@@ -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];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user