Commit e838376c authored by Martin Reinecke's avatar Martin Reinecke
Browse files

pass -> cpass

parent 055bef02
......@@ -551,14 +551,14 @@ virtual void exec(bool fwd, PCTvR<T0> &d1, PCTvR<T0> &d2) const \
#endif
template<typename T0> class pass
template<typename T0> class cpass
{
protected:
size_t ip, ido, l1;
arr<cmplx<T0>> wa;
public:
pass (size_t ip_, size_t ido_, size_t l1_, const sincos_2pibyn<T0> &twid)
cpass(size_t ip_, size_t ido_, size_t l1_, const sincos_2pibyn<T0> &twid)
: ip(ip_), ido(ido_), l1(l1_), wa((ip_-1)*(ido_-1))
{
for (size_t i=1; i<ido; ++i)
......@@ -569,14 +569,14 @@ template<typename T0> class pass
#ifndef POCKETFFT_NO_VECTORS
virtual void exec(bool fwd, PCTvR<T0> &d1, PCTvR<T0> &d2) const = 0;
#endif
virtual ~pass() {}
virtual ~cpass() {}
};
template<typename T0> class cfftp_pass2 : public pass<T0>
template<typename T0> class cfftp_pass2 : public cpass<T0>
{
private:
using pass<T0>::ido;
using pass<T0>::l1;
using pass<T0>::wa;
using cpass<T0>::ido;
using cpass<T0>::l1;
using cpass<T0>::wa;
template<bool fwd, typename T> void texec(PTR<T> &cc, PTR<T> &ch) const
{
constexpr size_t cdim=2;
......@@ -610,16 +610,16 @@ template<typename T0> class cfftp_pass2 : public pass<T0>
public:
cfftp_pass2(size_t ip_, size_t ido_, size_t l1_, const sincos_2pibyn<T0> &twid)
: pass<T0>(ip_, ido_, l1_, twid) {}
: cpass<T0>(ip_, ido_, l1_, twid) {}
POCKETFFT_BOILERPLATE_EXEC
POCKETFFT_BOILERPLATE_EXECV
};
template<typename T0> class cfftp_pass4 : public pass<T0>
template<typename T0> class cfftp_pass4 : public cpass<T0>
{
private:
using pass<T0>::ido;
using pass<T0>::l1;
using pass<T0>::wa;
using cpass<T0>::ido;
using cpass<T0>::l1;
using cpass<T0>::wa;
template<bool fwd, typename T> void texec(PTR<T> &cc, PTR<T> &ch) const
{
constexpr size_t cdim=4;
......@@ -671,17 +671,17 @@ template<typename T0> class cfftp_pass4 : public pass<T0>
public:
cfftp_pass4(size_t ip_, size_t ido_, size_t l1_, const sincos_2pibyn<T0> &twid)
: pass<T0>(ip_, ido_, l1_, twid) {}
: cpass<T0>(ip_, ido_, l1_, twid) {}
POCKETFFT_BOILERPLATE_EXEC
POCKETFFT_BOILERPLATE_EXECV
};
template<typename T0> class cfftp_pass8 : public pass<T0>
template<typename T0> class cfftp_pass8 : public cpass<T0>
{
private:
using pass<T0>::ido;
using pass<T0>::l1;
using pass<T0>::wa;
using cpass<T0>::ido;
using cpass<T0>::l1;
using cpass<T0>::wa;
template <bool fwd, typename T> static void ROTX45(T &a)
{
......@@ -792,16 +792,16 @@ template<typename T0> class cfftp_pass8 : public pass<T0>
public:
cfftp_pass8(size_t ip_, size_t ido_, size_t l1_, const sincos_2pibyn<T0> &twid)
: pass<T0>(ip_, ido_, l1_, twid) {}
: cpass<T0>(ip_, ido_, l1_, twid) {}
POCKETFFT_BOILERPLATE_EXEC
POCKETFFT_BOILERPLATE_EXECV
};
template<typename T0> class cfftp_pass3 : public pass<T0>
template<typename T0> class cfftp_pass3 : public cpass<T0>
{
private:
using pass<T0>::ido;
using pass<T0>::l1;
using pass<T0>::wa;
using cpass<T0>::ido;
using cpass<T0>::l1;
using cpass<T0>::wa;
template<bool fwd, typename T> void texec(PTR<T> &cc, PTR<T> &ch) const
{
......@@ -863,16 +863,16 @@ template<typename T0> class cfftp_pass3 : public pass<T0>
public:
cfftp_pass3(size_t ip_, size_t ido_, size_t l1_, const sincos_2pibyn<T0> &twid)
: pass<T0>(ip_, ido_, l1_, twid) {}
: cpass<T0>(ip_, ido_, l1_, twid) {}
POCKETFFT_BOILERPLATE_EXEC
POCKETFFT_BOILERPLATE_EXECV
};
template<typename T0> class cfftp_pass5 : public pass<T0>
template<typename T0> class cfftp_pass5 : public cpass<T0>
{
private:
using pass<T0>::ido;
using pass<T0>::l1;
using pass<T0>::wa;
using cpass<T0>::ido;
using cpass<T0>::l1;
using cpass<T0>::wa;
template<bool fwd, typename T> void texec(PTR<T> &cc, PTR<T> &ch) const
{
......@@ -948,16 +948,16 @@ template<typename T0> class cfftp_pass5 : public pass<T0>
public:
cfftp_pass5(size_t ip_, size_t ido_, size_t l1_, const sincos_2pibyn<T0> &twid)
: pass<T0>(ip_, ido_, l1_, twid) {}
: cpass<T0>(ip_, ido_, l1_, twid) {}
POCKETFFT_BOILERPLATE_EXEC
POCKETFFT_BOILERPLATE_EXECV
};
template<typename T0> class cfftp_pass7 : public pass<T0>
template<typename T0> class cfftp_pass7 : public cpass<T0>
{
private:
using pass<T0>::ido;
using pass<T0>::l1;
using pass<T0>::wa;
using cpass<T0>::ido;
using cpass<T0>::l1;
using cpass<T0>::wa;
template<bool fwd, typename T> void texec(PTR<T> &cc, PTR<T> &ch) const
{
......@@ -1036,16 +1036,16 @@ template<typename T0> class cfftp_pass7 : public pass<T0>
public:
cfftp_pass7(size_t ip_, size_t ido_, size_t l1_, const sincos_2pibyn<T0> &twid)
: pass<T0>(ip_, ido_, l1_, twid) {}
: cpass<T0>(ip_, ido_, l1_, twid) {}
POCKETFFT_BOILERPLATE_EXEC
POCKETFFT_BOILERPLATE_EXECV
};
template<typename T0> class cfftp_pass11 : public pass<T0>
template<typename T0> class cfftp_pass11 : public cpass<T0>
{
private:
using pass<T0>::ido;
using pass<T0>::l1;
using pass<T0>::wa;
using cpass<T0>::ido;
using cpass<T0>::l1;
using cpass<T0>::wa;
template<bool fwd, typename T> void texec(PTR<T> &cc, PTR<T> &ch) const
{
......@@ -1136,17 +1136,17 @@ template<typename T0> class cfftp_pass11 : public pass<T0>
public:
cfftp_pass11(size_t ip_, size_t ido_, size_t l1_, const sincos_2pibyn<T0> &twid)
: pass<T0>(ip_, ido_, l1_, twid) {}
: cpass<T0>(ip_, ido_, l1_, twid) {}
POCKETFFT_BOILERPLATE_EXEC
POCKETFFT_BOILERPLATE_EXECV
};
template<typename T0> class cfftp_passg : public pass<T0>
template<typename T0> class cfftp_passg : public cpass<T0>
{
private:
using pass<T0>::ip;
using pass<T0>::ido;
using pass<T0>::l1;
using pass<T0>::wa;
using cpass<T0>::ip;
using cpass<T0>::ido;
using cpass<T0>::l1;
using cpass<T0>::wa;
arr<cmplx<T0>> csarr;
template<bool fwd, typename T> void texec(PTR<T> &cc, PTR<T> &ch) const
......@@ -1257,7 +1257,7 @@ template<typename T0> class cfftp_passg : public pass<T0>
public:
cfftp_passg(size_t ip_, size_t ido_, size_t l1_, const sincos_2pibyn<T0> &twid)
: pass<T0>(ip_, ido_, l1_, twid), csarr(ip_)
: cpass<T0>(ip_, ido_, l1_, twid), csarr(ip_)
{
for (size_t j=0; j<ip; ++j)
csarr[j] = twid.cdata()[j*l1*ido];
......@@ -1270,7 +1270,7 @@ template<typename T0> class cfftp
{
private:
size_t length;
vector<unique_ptr<pass<T0>>> passes;
vector<unique_ptr<cpass<T0>>> passes;
template<typename P> void add_pass(size_t ip, size_t &n, size_t &l1,
const sincos_2pibyn<T0> &twid)
......@@ -1337,13 +1337,13 @@ template<typename T0> class cfftp
}
};
template<typename T0> class bluepass: public pass<T0>
template<typename T0> class bluepass: public cpass<T0>
{
private:
using pass<T0>::ip;
using pass<T0>::ido;
using pass<T0>::l1;
using pass<T0>::wa;
using cpass<T0>::ip;
using cpass<T0>::ido;
using cpass<T0>::l1;
using cpass<T0>::wa;
size_t n2;
cfftp<T0> plan;
arr<cmplx<T0>> mem;
......@@ -1400,7 +1400,7 @@ template<typename T0> class bluepass: public pass<T0>
public:
POCKETFFT_NOINLINE bluepass(size_t ip_, size_t ido_, size_t l1_, const sincos_2pibyn<T0> &twid)
: pass<T0>(ip_, ido_, l1_, twid),
: cpass<T0>(ip_, ido_, l1_, twid),
n2(util::good_size(ip*2-1)), plan(n2), mem(ip+n2),
bk(mem.data()), bkf(mem.data()+ip)
{
......@@ -2412,7 +2412,7 @@ template<typename T0> class pocketfft_c
{
private:
size_t len;
vector<unique_ptr<pass<T0>>> passes;
vector<unique_ptr<cpass<T0>>> passes;
template<typename P> void add_pass(size_t ip, size_t &n, size_t &l1,
const sincos_2pibyn<T0> &twid)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment