PIFFT_float
git-svn-id: svn://db.shs.com.ru/pip@124 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -25,10 +25,10 @@
|
||||
|
||||
#include "pimathbase.h"
|
||||
|
||||
class PIP_EXPORT PIFFT
|
||||
class PIP_EXPORT PIFFT_double
|
||||
{
|
||||
public:
|
||||
PIFFT();
|
||||
PIFFT_double();
|
||||
|
||||
PIVector<complexd> * calcFFT(const PIVector<complexd> &val);
|
||||
PIVector<complexd> * calcFFT(const PIVector<double> &val);
|
||||
@@ -38,11 +38,7 @@ public:
|
||||
|
||||
private:
|
||||
PIVector<complexd> result;
|
||||
bool prepared;
|
||||
typedef ptrdiff_t ae_int_t;
|
||||
void calc_coefs(uint cnt2);
|
||||
void calc_indexes(uint cnt2, uint deep2);
|
||||
complexd coef(uint n, uint k);
|
||||
|
||||
struct ftplan {
|
||||
PIVector<int> plan;
|
||||
@@ -71,7 +67,54 @@ private:
|
||||
void ftbase_internalreallintranspose(PIVector<double> *a, int m, int n, int astart, PIVector<double> *buf);
|
||||
void ftbase_fftirltrec(PIVector<double> *a, int astart, int astride, PIVector<double> *b, int bstart, int bstride, int m, int n);
|
||||
void ftbase_ffttwcalc(PIVector<double> *a, int aoffset, int n1, int n2);
|
||||
|
||||
};
|
||||
|
||||
class PIP_EXPORT PIFFT_float
|
||||
{
|
||||
public:
|
||||
PIFFT_float();
|
||||
|
||||
PIVector<complexf> * calcFFT(const PIVector<complexf> &val);
|
||||
PIVector<complexf> * calcFFT(const PIVector<float> &val);
|
||||
PIVector<complexf> * calcFFTinverse(const PIVector<complexf> &val);
|
||||
PIVector<complexf> * calcHilbert(const PIVector<float> &val);
|
||||
PIVector<float> getAmplitude();
|
||||
|
||||
private:
|
||||
PIVector<complexf> result;
|
||||
typedef ptrdiff_t ae_int_t;
|
||||
|
||||
struct ftplan {
|
||||
PIVector<int> plan;
|
||||
PIVector<float> precomputed;
|
||||
PIVector<float> tmpbuf;
|
||||
PIVector<float> stackbuf;
|
||||
};
|
||||
|
||||
ftplan curplan;
|
||||
|
||||
void fftc1d(const PIVector<complexf> &a, uint n);
|
||||
void fftc1r(const PIVector<float> &a, uint n);
|
||||
void fftc1dinv(const PIVector<complexf> &a, uint n);
|
||||
|
||||
void createPlan(uint n);
|
||||
void ftbasegeneratecomplexfftplan(uint n, ftplan *plan);
|
||||
void ftbase_ftbasegenerateplanrec(int n, int tasktype, ftplan *plan, int *plansize, int *precomputedsize, int *planarraysize, int *tmpmemsize, int *stackmemsize, ae_int_t stackptr, int debugi=0);
|
||||
void ftbase_ftbaseprecomputeplanrec(ftplan *plan, int entryoffset, ae_int_t stackptr);
|
||||
void ftbasefactorize(int n, int *n1, int *n2);
|
||||
void ftbase_ftbasefindsmoothrec(int n, int seed, int leastfactor, int *best);
|
||||
int ftbasefindsmooth(int n);
|
||||
void ftbaseexecuteplan(PIVector<float> *a, int aoffset, int n, ftplan *plan);
|
||||
void ftbaseexecuteplanrec(PIVector<float> *a, int aoffset, ftplan *plan, int entryoffset, ae_int_t stackptr);
|
||||
void ftbase_internalcomplexlintranspose(PIVector<float> *a, int m, int n, int astart, PIVector<float> *buf);
|
||||
void ftbase_ffticltrec(PIVector<float> *a, int astart, int astride, PIVector<float> *b, int bstart, int bstride, int m, int n);
|
||||
void ftbase_internalreallintranspose(PIVector<float> *a, int m, int n, int astart, PIVector<float> *buf);
|
||||
void ftbase_fftirltrec(PIVector<float> *a, int astart, int astride, PIVector<float> *b, int bstart, int bstride, int m, int n);
|
||||
void ftbase_ffttwcalc(PIVector<float> *a, int aoffset, int n1, int n2);
|
||||
};
|
||||
|
||||
typedef PIFFT_double PIFFT;
|
||||
typedef PIFFT_double PIFFTd;
|
||||
typedef PIFFT_float PIFFTf;
|
||||
|
||||
#endif // PIFFT_H
|
||||
|
||||
Reference in New Issue
Block a user