mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
moved scaling to Eigen::FFT
This commit is contained in:
@@ -187,12 +187,6 @@
|
||||
void inv(Complex * dst,const Complex *src,int nfft)
|
||||
{
|
||||
get_plan(nfft,true,dst,src).inv(ei_fftw_cast(dst), ei_fftw_cast(src),nfft );
|
||||
|
||||
//TODO move scaling to Eigen::FFT
|
||||
// scaling
|
||||
Scalar s = Scalar(1.)/nfft;
|
||||
for (int k=0;k<nfft;++k)
|
||||
dst[k] *= s;
|
||||
}
|
||||
|
||||
// half-complex to scalar
|
||||
@@ -200,11 +194,6 @@
|
||||
void inv( Scalar * dst,const Complex * src,int nfft)
|
||||
{
|
||||
get_plan(nfft,true,dst,src).inv(ei_fftw_cast(dst), ei_fftw_cast(src),nfft );
|
||||
|
||||
//TODO move scaling to Eigen::FFT
|
||||
Scalar s = Scalar(1.)/nfft;
|
||||
for (int k=0;k<nfft;++k)
|
||||
dst[k] *= s;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
@@ -334,7 +334,6 @@
|
||||
void inv(Complex * dst,const Complex *src,int nfft)
|
||||
{
|
||||
get_plan(nfft,true).work(0, dst, src, 1,1);
|
||||
scale(dst, nfft, Scalar(1)/nfft );
|
||||
}
|
||||
|
||||
// half-complex to scalar
|
||||
@@ -362,7 +361,6 @@
|
||||
m_tmpBuf[k] = fek + fok;
|
||||
m_tmpBuf[ncfft-k] = conj(fek - fok);
|
||||
}
|
||||
scale(&m_tmpBuf[0], ncfft, Scalar(1)/nfft );
|
||||
get_plan(ncfft,true).work(0, reinterpret_cast<Complex*>(dst), &m_tmpBuf[0], 1,1);
|
||||
}
|
||||
}
|
||||
@@ -403,12 +401,4 @@
|
||||
}
|
||||
return &twidref[0];
|
||||
}
|
||||
|
||||
// TODO move scaling up into Eigen::FFT
|
||||
inline
|
||||
void scale(Complex *dst,int n,Scalar s)
|
||||
{
|
||||
for (int k=0;k<n;++k)
|
||||
dst[k] *= s;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user