Skip to content

Commit

Permalink
fix: [plugin] re-enable autocorrelation in Width Framer
Browse files Browse the repository at this point in the history
  • Loading branch information
hello-adam committed May 30, 2021
1 parent 3cca4ed commit 402fcf0
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/hobbits-plugins/analyzers/WidthFramer/widthframerform.cpp
Expand Up @@ -5,9 +5,7 @@
#include <QVBoxLayout>
#include <QtGlobal>

#ifdef FFTW_AUTOCORRELATION
#include <fftw3.h>
#endif

WidthFramerForm::WidthFramerForm(QSharedPointer<ParameterDelegate> delegate) :
ui(new Ui::WidthFramerForm()),
Expand All @@ -31,16 +29,10 @@ WidthFramerForm::WidthFramerForm(QSharedPointer<ParameterDelegate> delegate) :
connect(ui->lv_correlations, SIGNAL(clicked(QModelIndex)), this, SLOT(widthSelected(QModelIndex)));
connect(ui->rb_all, SIGNAL(toggled(bool)), this, SLOT(setupScoreList(bool)));
connect(ui->rb_top100, SIGNAL(toggled(bool)), this, SLOT(setupScoreList(bool)));

#ifdef FFTW_AUTOCORRELATION
#endif
}

WidthFramerForm::~WidthFramerForm()
{
#ifdef FFTW_AUTOCORRELATION
#endif

delete m_peakSelector;
delete ui;
}
Expand Down Expand Up @@ -148,7 +140,6 @@ void WidthFramerForm::widthSelected(QModelIndex index)

QVector<QPointF> WidthFramerForm::autocorrelate(QSharedPointer<const BitArray> bits)
{
#ifdef FFTW_AUTOCORRELATION
int N = 1 << 19;
fftw_complex *fft_in = reinterpret_cast<fftw_complex*>(fftw_malloc(sizeof(fftw_complex) * unsigned(N)));
fftw_complex *fft_out = reinterpret_cast<fftw_complex*>(fftw_malloc(sizeof(fftw_complex) * unsigned(N)));
Expand Down Expand Up @@ -192,7 +183,4 @@ QVector<QPointF> WidthFramerForm::autocorrelate(QSharedPointer<const BitArray> b
fftw_free(fft_out);

return results;
#else
return QVector<QPointF>();
#endif
}

0 comments on commit 402fcf0

Please sign in to comment.